import echarts from "echarts";
import { data } from "jquery";
//当前视口宽度
let nowClientWidth = document.documentElement.clientWidth;
let nowClientHeight = document.documentElement.clientHeight;
// 换算方法
let nowSize = function (val, initWidth = 1920) {
	return val * (nowClientWidth / initWidth);
};
// 换算方法
let nowSizeH = function (val, initHeight = 1080) {
	return val * (nowClientHeight / initHeight);
};
export default {
	formatterFunction: (value, max) => {
		let maxLength = max || 3; //每项显示文字个数
		let valLength = value.length; //X轴类目项的文字个数
		let rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
		if (rowN <= 1) {
			return value
		}
		// let ret = "";//拼接加\n返回的类目项
		let ret = []
		for (let i = 0; i < rowN; i++) {
			// let temp = "";//每次截取的字符串
			let start = i * maxLength; //开始截取的位置
			let end = start + maxLength; //结束截取的位置
			ret.push(value.substring(start, end))
			// temp = value.substring(start, end) + "\n";
			// ret += temp; //凭借最终的字符串
		}
		return ret.join("\n");
	},
	//柱状堆叠图
	getStackBar: (optionData) => {
		let innerWidth = window.innerWidth
		let option = {
			color: optionData.color,
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				data: [],
				right: "1%",
				left: optionData.legendPosition || "right",
				top: "0%",
				width: "80%",
				borderRadius: "0",
				itemGap: 5,
				icon: "circle",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(optionData.legendSize) || nowSize(12),
					padding: 0
				}
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: optionData.LinearGradientbottom||"3%",
				top: optionData.gridTop || "18%",
				containLabel: true,
            },
            dataZoom: optionData.LinearGradientDataZoom||[],
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						color: '#ffffff',
						fontSize: nowSize(16),
						rotate: optionData.rotate || 0,
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',

						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.unit,
					nameTextStyle: {
						color: 'rgba(255,255,255,0)',
						fontSize: nowSize(16),
					},
					type: "value",
					max: optionData.max ? optionData.max : null,
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "bar",
					stack: '0',
					data: optionData.seriesData[0].data,
					barWidth: '20%',
					showBackground: true,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					}
				}
			],
		}
		return option
	},
	//柱状图, 一个项放多个柱状
	getStackBar02: (optionData) => {
		let innerWidth = window.innerWidth
		let option = {
			color: optionData.color,
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				data: [],
				right: "1%",
				left: optionData.legendPosition || "right",
				top: "0%",
				width: "80%",
				borderRadius: "0",
				itemGap: 5,
				icon: "circle",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(optionData.legendSize) || nowSize(12),
					padding: 0
				}
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "18%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						color: '#ffffff',
						fontSize: nowSize(16),
						rotate: optionData.rotate || 0,
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',

						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					max: optionData.max ? optionData.max : null,
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "bar",
					stack: optionData.seriesData[0].name,
					data: optionData.seriesData[0].data,
					barWidth: '20%',
					// showBackground: true,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					}
				}
			],
		}
		return option
	},
	//两个柱状叠堆图
	getStackBarDouble: (optionData) => {
		let innerWidth = window.innerWidth
		let option = {
			color: optionData.color,
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				data: optionData.legendData,
				right: "1%",
				left: optionData.legendPosition || "right",
				top: "0%",
				width: "80%",
				borderRadius: "0",
				itemGap: 5,
				icon: "rect",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				}
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "18%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						color: '#ffffff',
						fontSize: nowSize(16),
						rotate: optionData.rotate || 0,
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',

						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					max: optionData.max ? optionData.max : null,
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "bar",
					stack: '0',
					data: optionData.seriesData[0].data,
					barWidth: '30%',
					showBackground: false,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					}
				},
				{
					name: optionData.seriesData[1].name,
					type: "bar",
					stack: '0',
					data: optionData.seriesData[1].data,
					barWidth: '30%',
					showBackground: false,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					}
				},
				{
					name: optionData.seriesData[2].name,
					type: "bar",
					stack: '0',
					data: optionData.seriesData[2].data,
					barWidth: '30%',
					showBackground: false,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					}
				},
				{
					name: optionData.seriesData[3].name,
					type: "bar",
					stack: '1',
					data: optionData.seriesData[3].data,
					barWidth: '30%',
					showBackground: false,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					}
				},
			],
		}
		return option
	},
	//柱状图和折线图
	getBarAndLine: (optionData) => {
		let option = {
			color: ["#03cefa", "#fd664d", "#f1db25"],
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
        },
        formatter: function (params) {
            return params[0].name + '</br>' + params[0].seriesName + ' : ' + params[0].value + optionData.seriesData[0].unit
            + '</br>' + params[1].seriesName + ' : ' + params[1].value + optionData.seriesData[1].unit
          },
				transitionDuration: 0,
			},
			legend: {
				data: [
					{
						name: optionData.seriesData[0].name,
						icon: "rect",
					},
					{
						name: optionData.seriesData[1].name,
					},
				],
				left: "right",
				top: nowClientWidth < 1400 ? '-2%' : "0%",
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "22%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						fontSize: nowSize(16),
						color: '#ffffff'
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, 20, -5, 0]
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
				{
					name: optionData.seriesData[1].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, 0, -5, 30]
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "bar",
					data: optionData.seriesData[0].data,
					barWidth: '40%',
					showBackground: true,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					},
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							}, {
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}]),
						}
					}
				},
				{
					name: optionData.seriesData[1].name,
					type: "line",
					data: optionData.seriesData[1].data,
					symbol: "circle",
					yAxisIndex: 1,
					symbolSize: 7,
					itemStyle: {
						color: optionData.LineCircleColor,
						borderColor: optionData.LineCircleBorderColor,
					},
				}
			],
		}
		return option
	},
	//单y轴折柱图
	getBarLine: (optionData) => {
		console.log('optionData', optionData)
		let option = {
			color: ["#03cefa", "#fd664d", "#f1db25"],
			tooltip: {
				show: true,
				formatter: function (params) {
					return params[0].name + '</br>' + params[0].seriesName + ' : ' + params[0].value + optionData.seriesData[0].unit
						+ '</br>' + params[1].seriesName + ' : ' + params[1].value + optionData.seriesData[1].unit;
				},
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				data: [
					{
						name: optionData.seriesData[0].name,
						icon: "rect",
					},
					{
						name: optionData.seriesData[1].name,
					},
				],
				left: "right",
				top: nowClientWidth < 1400 ? '-2%' : "0%",
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "22%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						fontSize: nowSize(16),
						color: '#ffffff'
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, 20, -5, 0]
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
				{
					show: false,
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "bar",
					data: optionData.seriesData[0].data,
					barWidth: '40%',
					// showBackground: true,
					// backgroundStyle: {
					// 	color: 'rgba(85, 111, 181, 0.2)'
					// },
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							}, {
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}]),
						}
					},
				},
				{
					name: optionData.seriesData[1].name,
					type: "line",
					data: optionData.seriesData[1].data,
					symbol: "none",
					smooth: true,
					yAxisIndex: 1,
					symbolSize: 7,
					itemStyle: {
						color: optionData.LineCircleColor,
						borderColor: optionData.LineCircleBorderColor,
					},
					areaStyle: {
						normal: {
							//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[1].topColor
							},
							{
								offset: 1,
								color: optionData.LinearGradientColor[1].bottomColor
							}
							]),
						}
					}
				}
			],
		}
		return option
	},
	//锥形柱状图
	getPictorialBar: (optionData) => {
		let option = {
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				show: false,
				data: [optionData.seriesData[0].name],
				icon: "rect",
				right: "2%",
				top: "0%",
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "4%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "18%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						fontSize: nowSize(16),
						color: '#ffffff',
						rotate: optionData.labelRorate ? "45" : "0"
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, -15, 0, 0]
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					data: optionData.seriesData[0].data,
					barWidth: '40%',
					symbolPosition: 'start',
					type: "pictorialBar",
					barCategoryGap: "20%",
					symbol: 'path://d="M150 50 L130 130 L170 130  Z"',
					showBackground: true,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					},
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							}, {
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}]),
						}
					}
				}
			],
		}
		return option
	},
	//折线图
	getLine: (optionData) => {
		let option = {
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				data: [],
				icon: "rect",
				right: "2%",
				left: optionData.legendPosition || "right",
				width: "80%",
				top: "0%",
				itemGap: 5,
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "22%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						color: '#ffffff',
						fontSize: nowSize(16),
						rotate: optionData.rotate||0
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
				{
					name: '',
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "line",
					data: optionData.seriesData[0].data,
					smooth: optionData.smooth,
					symbol: "circle",
					symbolSize: 7,
					itemStyle: {
						color: optionData.color[0],
						borderColor: optionData.color[0],
					},
				}
			],
		}
		return option
	},
	getNewLine: (optionData) => {
		let option = {
			tooltip: {
        show: true,
				formatter: function (params) {
          if(params[1]){
            return params[0].name + '</br>' + params[0].seriesName + ' : ' + params[0].value + optionData.seriesData[0].unit
            + '</br>' + params[1].seriesName + ' : ' + params[1].value + optionData.seriesData[1].unit
          } else {
            return params[0].name + '</br>' + params[0].seriesName + ' : ' + params[0].value + optionData.seriesData[0].unit
          }

				},
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				backgroundColor: 'rgba(13, 132, 134, .5)',
				transitionDuration: 0,
			},
			legend: {
				data: [],
				icon: "circle",
				right: "2%",
				left: optionData.legendPosition || "right",
				width: "80%",
				top: "0%",
				itemGap: 5,
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "22%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						color: '#ffffff',
						fontSize: nowSize(16),
						rotate: optionData.rotate || 0,
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
				{
					name: '',
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			// series: this.getSeries(optionData),
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "line",
					showSymbol: false,
					data: optionData.seriesData[0].data,
					smooth: optionData.smooth,
					symbol: "none",
					symbolSize: 7,
					itemStyle: {
						color: optionData.color[0],
						borderColor: optionData.color[0],
					},
					areaStyle: {
						normal: {
							//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							},
							{
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}
							]),
						}
					}
				},
			],
		}
		return option
	},
	getNewLine02: (optionData) => {
		let option = {
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				backgroundColor: 'rgba(13, 132, 134, .5)',
				transitionDuration: 0,
			},
			legend: {
				data: [],
				icon: "circle",
				right: "2%",
				left: optionData.legendPosition || "right",
				width: "80%",
				top: "0%",
				itemGap: 5,
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "22%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						color: '#ffffff',
						fontSize: nowSize(16),
						rotate: optionData.rotate || 0,
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
				{
					name: '',
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			// series: this.getSeries(optionData),
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "line",
					showSymbol: true,
					data: optionData.seriesData[0].data,
					smooth: optionData.smooth,
					symbol: "circle",
					symbolSize: 7,
					itemStyle: {
						color: optionData.color[0],
						borderColor: optionData.color[0],
					},
					lineStyle: {
						type: optionData.lineType[0]
					}
				},
			],
		}
		return option
	},
	//柱状图
	getBar: (optionData) => {
		let innerWidth = window.innerWidth
		let option = {
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				data: [],
				icon: "rect",
				right: "2%",
				left: optionData.legendPosition || "right",
				top: nowClientWidth < 1400 ? '-2%' : "0%",
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "18%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						fontSize: nowSize(16),
						color: '#ffffff',
						rotate: optionData.labelRorate ? 45 : 0
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, 20, -5, 0]
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				}, {
					name: "",
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, 0, -5, 20]
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "bar",
					data: optionData.seriesData[0].data,
					barWidth: optionData.barWidth ? optionData.barWidth : '20%',
					showBackground: optionData.showBackground,
					backgroundStyle: {
						color: optionData.backgroundColor
					},
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							}, {
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}]),
							label: {
								show: true,
								position: [0, -10],
								textStyle: {
									color: 'RGBA(224, 228, 228, 1)',
									fontWeight: 'bolder'
								},
								formatter: function (param) {
									return '-'
								}
							}
						}
					}
				},
			],
		}
		return option
	},
	//柱状图--单位相同时，分两个坐标轴显示
	getBarDouble: (optionData) => {
		let innerWidth = window.innerWidth
		let option = {
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				data: [],
				icon: "rect",
				right: "2%",
				left: optionData.legendPosition || "right",
				top: nowClientWidth < 1400 ? '-2%' : "0%",
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "18%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						fontSize: nowSize(16),
						color: '#ffffff',
						rotate: innerWidth < 1400 && optionData.labelRorate ? "35" : "0"
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, 20, -5, 0]
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				}, {
					name: optionData.seriesData[1].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, 0, -5, 20]
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "bar",
					data: optionData.seriesData[0].data,
					barWidth: optionData.barWidth ? optionData.barWidth : '20%',
					showBackground: optionData.showBackground,
					backgroundStyle: {
						color: optionData.backgroundColor
					},
					yAxisIndex: 0,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							}, {
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}]),
						}
					}
				},
				{
					name: optionData.seriesData[1].name,
					type: "bar",
					data: optionData.seriesData[1].data,
					barWidth: optionData.barWidth ? optionData.barWidth : '20%',
					showBackground: optionData.showBackground,
					backgroundStyle: {
						color: optionData.backgroundColor
					},
					yAxisIndex: 1,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[1].topColor
							}, {
								offset: 1,
								color: optionData.LinearGradientColor[1].bottomColor
							}]),
						}
					}
				},
			],
		}
		optionData.seriesData.forEach((data) => {
			option.legend.data.push(data.name) //图例
		})
		return option
	},
	//饼图外发光类型
	getPielight: (optionData) => {
		let option = {
			type: 'noyAxis',
			legend: {
				orient: 'vertical',
				right: optionData.right,
				top: 'middle',
				data: optionData.seriesData,
				textStyle: {
					rich: {
						a: {
							color: '#7CB1E2',
							fontSize: nowSize(16),
							// lineHeight: 16,
						},
						b: {
							fontSize: nowSize(16),
							color: '#7ABFFF',
							align: 'center',
							padding: [0, 0, 0, 15],
							// lineHeight: 16,
						}
					}
				},
				icon: "pin",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				formatter: function (param) {
					let total = 0;
					let target;
					for (var i = 0, l = optionData.seriesData.length; i < l; i++) {
						total += parseInt(optionData.seriesData[i].value);
						if (optionData.seriesData[i].name == param) {
							target = optionData.seriesData[i].value;
						}
					}
					let arr = [
						'{a|' + param + '}',
						'{b|' + ((target / total) * 100).toFixed(2) + '%}'
					]
					return arr.join('')
				}
			},
			tooltip: {
				trigger: 'item',
				formatter: '{a} <br/>{b}: {c} ({d}%)',
				transitionDuration: 0,
			},
			series: [
				{
					name: optionData.title,
					type: 'pie',
					radius: optionData.pieRadius ? optionData.pieRadius : ['35%', '70%'],
					center: optionData.center ? optionData.center : ['40%', '50%'],
					label: {
						// show: optionData.labelShow,
						// position: optionData.position,
						// formatter: '{d}%',
						// color: function (params) {
						// 	return '#fff'
						// },
						normal: {
							show: optionData.labelShow,
							position: optionData.position,
							color: optionData.labelColor,
							formatter: '{d}%'
						}
					},
					emphasis: {
						label: {
							show: optionData.emphasisLable,
							formatter: function (params) {
								let value = '';
								value = '{a|' + params.data.name + '}\r\n' + '{b|' + params.percent + '%' + '}';
								return value;
							},
							rich: {
								a: {
									color: '#ccc',
									fontSize: nowSize(16),
									lineHeight: nowSizeH(16)
								},
								b: {
									color: '#fff',
									fontSize: nowSize(16),
									lineHeight: nowSizeH(18)
								}
							}
						},
					},
					data: optionData.seriesData,
					itemStyle: {
						normal: {
							color: function (params) {
								let colorList = optionData.color
								return new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
									offset: 0,
									color: colorList[params.dataIndex].c1
								}, {
									offset: 1,
									color: colorList[params.dataIndex].c2
								}])
							},
							labelLine: {
								show: false
							},
						}
					}
				},
				{
					name: '',
					type: 'gauge',
					splitNumber: 30,
					radius: optionData.radius,
					center: optionData.center ? optionData.center : ['40%', '50%'],
					startAngle: 0,
					endAngle: 359.9999,
					axisLine: {
						show: false
					},
					axisTick: {
						show: true,
						lineStyle: {
							color: "#3CABF8",
							width: 1,
							height: 1,
							shadowBlur: 1,
						},
						length: 9,
						splitNumber: 3
					},
					splitLine: {
						show: false
					},
					axisLabel: {
						show: false
					},
					detail: {
						show: false
					}
				}
			]
		}
		return option
	},
	//带阴影的单个折线图
	getSingleLine: (optionData) => {
		let option = {
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				show: false,
				// data: [optionData.seriesData[1].name],
				right: "2%",
				top: "0%",
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: "18%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						fontSize: nowSize(16),
						color: '#ffffff',
            			rotate: optionData.labelRorate || 0
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					// name: optionData.seriesData[1].unit,
					name: optionData.seriesData[1].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					min: optionData.min || null,
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				// {
				// 	type: "bar",
				// 	data: optionData.seriesData[0].data,
				// 	barWidth: optionData.barWidth ? optionData.barWidth : '5%',
				// 	tooltip: {
				// 		show: false,
				// 	},
				// 	itemStyle: {
				// 		normal: {
				// 			color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
				// 				offset: 0,
				// 				color: optionData.LinearGradientColor[0].topColor
				// 			}, {
				// 				offset: 1,
				// 				color: optionData.LinearGradientColor[0].bottomColor
				// 			}]),
				// 		}
				// 	}
				// },
				{
					name: optionData.seriesData[1].name,
					type: "line",
					data: optionData.seriesData[1].data,
					symbol: "circle",
					symbolSize: 7,
					itemStyle: {
						normal: {
							color: optionData.lineRadiusColor || '#14d0e1',
							borderColor: optionData.LineCircleBorderColor,
							lineStyle: {
								color: optionData.LineCircleColor,

							}
						}
					},
					areaStyle: { //区域填充样式
						normal: {
							//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[1].topColor
							},
							{
								offset: 1,
								color: optionData.LinearGradientColor[1].bottomColor
							}
							]),
						}
					},
				}
			],
		}
		return option
	},
	//块状横向柱状图
	getBarBlock: (optionData) => {
		let datas = [];
		let dataMin = []
		let innerWidth = window.innerWidth
		optionData.seriesData.forEach(value => {
			datas.push(value.value);
		});
		datas.forEach(data => {
			optionData.dataMin !== undefined ? dataMin.push(optionData.dataMin) : dataMin.push(Math.min.apply(null, datas) / 20)
		})
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow',
					// shadowStyle: {
					// 	color: 'transparent'
					// }
				},
				formatter: function (item) {
					return optionData.title + '<br />' + item[1].data.name + ': ' + item[1].data.value
				},
				transitionDuration: 0,
			},
			xAxis: {
				max: optionData.total,
				splitLine: {
					show: false
				},
				axisLine: {
					show: false
				},
				axisLabel: {
					show: false
				},
				axisTick: {
					show: false
				},
			},
			grid: {
				left: optionData.left,
				top: 10, // 设置条形图的边距
				right: optionData.right || 60,
				bottom: 10
			},
			yAxis: [{
				type: "category",
				inverse: true,
				data: optionData.seriesData,
				axisLine: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisPointer: {
					label: {
						show: false,
						margin: 30
					}
				},
				axisLabel: {
					margin: optionData.axisLabelMargin ? optionData.axisLabelMargin : 170,
					fontSize: nowSize(16),
					align: 'left',
					color: '#333',
					rich: {
						a: {
							color: '#fff',
							backgroundColor: optionData.colorList[0],
							width: 16,
							height: 16,
							align: 'center',
							verticalAlign: 'middle',
							borderRadius: 4,
						},
						b: {
							color: '#fff',
							backgroundColor: optionData.colorList[1],
							width: 16,
							height: 16,
							align: 'center',
							verticalAlign: 'middle',
							borderRadius: 4,
						}
					},
					formatter: function (params, index) {
						index++;
						if (index - 1 < 5) {
							return [
								'{a|' + index + '}'
							].join('\n')
						} else {
							return [
								'{b|' + index + '}'
							].join('\n')
						}
					}
				}
			}],
			series: [
				{
					// 数据柱子左侧透明间隔
					type: "bar",
					barWidth: 10,
					legendHoverLink: false,
					silent: true,
					stack: '1',
					itemStyle: {
						normal: {
							color: "transparent",
						},
					},
					label: {
						normal: {
							show: false,
						},
					},
					data: dataMin,
					z: 1,
					animationEasing: "elasticOut"
				},
				{
					// 数据柱子渐变
					type: "bar",
					barWidth: 10,
					legendHoverLink: false,
					silent: true,
					stack: '1',
					itemStyle: {
						normal: {
							color: function (params) {
								if (params.dataIndex <= 4) {
									return new echarts.graphic.LinearGradient(1, 0, 0, 1, [
										{
											offset: 0,
											color: optionData.sorColor ? optionData.sorColor[0].bottomColor : optionData.BarGradientColor.bottomColor
										}, {
											offset: 1,
											color: optionData.sorColor ? optionData.sorColor[0].topColor : optionData.BarGradientColor.topColor
										},
									])
								} else {
									return new echarts.graphic.LinearGradient(1, 0, 0, 1, [
										{
											offset: 0,
											color: optionData.sorColor ? optionData.sorColor[1].bottomColor : optionData.BarGradientColor.bottomColor
										}, {
											offset: 1,
											color: optionData.sorColor ? optionData.sorColor[1].topColor : optionData.BarGradientColor.topColor
										},
									])
								}
							},
						}
					},
					label: {
						normal: {
							show: true,
							formatter: "{b}",
							textStyle: {
								color: "#fff",
								fontSize: nowSize(13)
							},
							position: optionData.labelPosition ? optionData.labelPosition : [-150, 0]
						},
						position: 'center'
					},
					data: optionData.seriesData,
					z: 1,
					animationEasing: "elasticOut"
				},
				{
					// 数据柱子分隔条
					type: "pictorialBar",
					itemStyle: {
						normal: {
							color: "#061348",
						},
					},
					symbolRepeat: "fixed",
					symbolMargin: 4,
					symbol: "rect",
					symbolClip: true,
					symbolSize: [2, 11],
					symbolPosition: 'left',
					symbolOffset: optionData.symbolOffset ? optionData.symbolOffset : [12, 0],
					symbolBoundingData: optionData.total,
					data: optionData.seriesData,
					z: 2,
					animationEasing: "elasticOut"
				},
				{
					// 背景条和右侧label
					name: optionData.categoryAxis,
					type: "pictorialBar",
					symbol: "rect",
					symbolBoundingData: optionData.total,
					itemStyle: {
						normal: {
							color: function (params) {
								if (optionData.backgroundSorColor) {
									if (params.dataIndex <= 4) {
										return new echarts.graphic.LinearGradient(0, 0, 1, 0, [
											{
												offset: 0,
												color: optionData.backgroundSorColor[0].leftColor
											}, {
												offset: 1,
												color: optionData.backgroundSorColor[0].rightColor
											},
										])
									} else {
										return new echarts.graphic.LinearGradient(0, 0, 1, 0, [
											{
												offset: 0,
												color: optionData.backgroundSorColor[1].leftColor
											}, {
												offset: 1,
												color: optionData.backgroundSorColor[1].rightColor
											},
										])
									}
								} else {
									return optionData.backgroundColor ? optionData.backgroundColor : "rgba(16,252,204,.1)"
								}

							}
							//
						}
					},
					symbolOffset: optionData.backgroundOffset ? optionData.backgroundOffset : [-180, 0],
					symbolSize: optionData.symbolSize ? optionData.symbolSize : innerWidth <= 1400 ? ['175%', '100%'] : innerWidth <= 1600 ? ['160%', '90%'] : ['143%', '80%'],
					label: {
						normal: {
							formatter: (params) => {
								if (params.dataIndex <= 4) {
									return optionData.Percent ? '{b|  ' + ((params.value / optionData.total) * 100).toFixed(2) + '%}' : '{a|  ' + params.data + '}';
								} else {
									return optionData.Percent ? '{c|  ' + ((params.value / optionData.total) * 100).toFixed(2) + '%}' : '{a|  ' + params.data + '}';
								}

							},
							rich: {
								a: {
									color: '#fff'
								},
								b: {
									color: '#EB5B46'
								},
								c: {
									color: '#20BCF6'
								},
							},
							position: 'right',
							distance: 0, // 向右偏移位置
							show: true,
							itemStyle: {
								normal: {
									color: "transparent", // 填充色
									top: 20,
									label: {
										// 标签显示位置
										show: false,
										position: "top", // insideTop 或者横向的 insideLeft
									}
								}
							}
						}
					},
					data: datas,
					z: 0,
					animationEasing: "elasticOut"
				},
			]
		}
		return option
	},
	//四象限图
	getMarkChart: (optionData) => {
		let option = {
			tooltip: {
				axisPointer: {
					show: true,
					type: 'cross',
					lineStyle: {
						type: 'dashed',
						width: 1
					},
					label: {
						backgroundColor: '#555'
					}
				},
				transitionDuration: 0,
			},
			dataZoom: [
				{
					type: 'inside',
					xAxisIndex: [0],
				},
				{
					type: 'inside',
					yAxisIndex: [0],
				}
			],
			grid: {
				left: '.7%',
				right: 8,
				bottom: '1%',
				top: '1%',
				containLabel: true
			},
			xAxis: {
				scale: false,
				boundaryGap: false,
				axisTick: {
					show: false
				},
				axisLabel: {
					show: false
				},
				axisLine: {
					show: false, //隐藏X轴轴线
					lineStyle: {
						color: '#2D455A'
					}
				},
				min: -optionData.Xmax1,
				max: optionData.Xmax1,
				interval: 5,
				splitLine: {
					lineStyle: {
						color: 'none'
					},
				}
			},
			yAxis: {
				scale: false,
				boundaryGap: false,
				axisLine: {
					lineStyle: {
						color: '#none'
					}
				},
				min: -optionData.Ymax1,
				max: optionData.Ymax1,
				axisTick: {
					show: false
				},
				axisLabel: {
					color: 'rgba(0,0,0,0)',
					show: false
				},
				splitLine: {
					lineStyle: {
						color: 'rgba(28,155,244,.2)'
					}
				}
			},
			series: [{
				type: 'scatter',
				data: optionData.seriesData.filter(data => data.name !== '石河子'),
				label: {
					show: true,
					position: 'bottom',
					formatter: '{b}'
				},
				itemStyle: {
					shadowBlur: 2,
					shadowColor: 'rgba(120, 36, 50, 0.5)',
					shadowOffsetY: 1,
					color: function (e) {
						let x = e.value[0];
						let y = e.value[1]
						if (x <= 0 && y <= 0) {
							return '#FF4F4F'
						} else if (x >= 0 && y <= 0) {
							return '#3EE465'
						} else if (x >= 0 && y >= 0) {
							return '#3EE2E4'
						} else if (x <= 0 && y >= 0) {
							return '#F7E303'
						}
						// let randomColor = ['#F7E303','#3EE465','#FF4F4F','#00EAFF','#F7E303','#3EE465','#FF4F4F','#00EAFF','#F7E303','#3EE465','#FF4F4F','#00EAFF']
						// console.log(randomColor)
						// return optionData.randomColor[e.dataIndex]

					}
				},
				// 各象限区域
				markArea: {
					silent: true,
					data: [
						// 第一象限
						[{
							name: optionData.names[0],
							xAxis: optionData.Xmax1, // x 轴开始位置
							yAxis: optionData.Ymax1, // y 轴结束位置(直接取最大值)
							itemStyle: {
								color: 'rgba(56, 180, 139, .1)'
							},
							label: {
								position: 'insideTop',
								padding: [10, 0, 0, 0],
								color: 'rgba(255, 255, 255, .7)',
								fontSize: nowSize(16),
								formatter: function (data) {
									return '{a|B}' + data.name
								},
								rich: {
									a: {
										color: '#F7E303',
										fontSize: nowSize(16),
										padding: [0, 10],
									},
								}
							},
							emphasis: {
								label: {
									position: 'top'
								}
							}
						}, {
							xAxis: 0, // y轴开始位置
							yAxis: 0 // y轴开始位置
						}],
						// 第二象限
						[{
							name: optionData.names[1],
							// yAxis: optionData.Ymax1, // y 轴结束位置(直接取最大值)
							xAxis: -optionData.Xmax1, // x 轴开始位置
							yAxis: 0, // y 轴结束位置(直接取最大值)
							itemStyle: {
								color: 'rgba(68, 97, 123, .1)'
							},
							label: {
								position: 'insideTop',
								padding: [10, 0, 0, 0],
								color: 'rgba(255, 255, 255, .7)',
								fontSize: nowSize(16),
								formatter: function (data) {
									return '{a|A}' + data.name
								},
								rich: {
									a: {
										color: '#F7E303',
										fontSize: nowSize(16),
										padding: [0, 10],
									},
								}
							}
						}, {
							xAxis: 0, // x 轴结束位置
							yAxis: optionData.Ymax1 // y轴开始位置
						}],
						// 第三象限
						[{
							name: optionData.names[2],
							xAxis: -optionData.Xmax1, // x 轴开始位置
							yAxis: 0, // y 轴结束位置(直接取最大值)
							itemStyle: {
								color: 'rgba(191, 120, 58, .1)'
							},
							label: {
								position: 'insideBottom',
								padding: [0, 0, 5, 0],
								color: 'rgba(255, 255, 255, .7)',
								fontSize: nowSize(16),
								formatter: function (data) {
									return '{a|D}' + data.name
								},
								rich: {
									a: {
										color: '#F7E303',
										fontSize: nowSize(16),
										padding: [0, 10],
									},
								}
							}
						}, {
							xAxis: 0, // x 轴结束位置
							yAxis: -optionData.Ymax1 // y轴开始位置
						}],
						// 第四象限
						[{
							name: optionData.names[3],
							xAxis: optionData.Xmax1, // x 轴开始位置
							yAxis: 0, // y 轴结束位置
							itemStyle: {
								color: 'rgba(116, 83, 153, .1)'
							},
							label: {
								position: 'insideBottom',
								padding: [0, 0, 5, 0],
								color: 'rgba(255, 255, 255, .7)',
								fontSize: nowSize(16),
								formatter: function (data) {
									return '{a|C}' + data.name
								},
								rich: {
									a: {
										color: '#F7E303',
										fontSize: nowSize(16),
										padding: [0, 10],
									},
								}
							}
						}, {
							xAxis: 0,
							yAxis: -optionData.Ymax1 // y轴开始位置
						}]
					]
				},
				// 中心点交集象限轴
				markLine: {
					silent: true, // 是否不响应鼠标事件
					precision: 0, // 精度
					lineStyle: {
						type: 'solid',
						color: '#1C9BF4'
					},
					label: {
						color: '#1C9BF4',
						position: 'start',
						formatter: '{b}'
					},
					data: optionData.centerLine
				},
				// 中心点
				// markPoint: {
				// 	symbol: 'roundRect',
				// 	symbolSize: 0,
				// 	itemStyle: {
				// 		color: 'rgba(234, 85, 6, .8)'
				// 	},
				// 	label: {
				// 		position: 'top'
				// 	},
				// 	data: optionData.opcenterMark
				// }
			}, {
				type: 'effectScatter',
				data: optionData.seriesData.filter(data => data.name === '石河子'),
				symbolSize: 30,
				showEffectOn: "render",
				rippleEffect: {
					brushType: "stroke",
					scale: 4,
					// color: "#f62157",
				},
				hoverAnimation: true,
				label: {
					show: true,
					position: 'bottom',
					formatter: '{b}',
					color: "#fff",
				},
				itemStyle: {
					color: "#f62157",
				},
			}]
		}
		return option
	},
	//人型柱状横图
	getPersonBar: (optionData) => {
		let option = {
			color: optionData.color,
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
				formatter: function (item) {
					let tooltip = [];
					let tooltipText = ""
					item.forEach((data, index) => {
						if (index === 0) {
							tooltipText = data.seriesName + ":" + data.data + optionData.seriesData[0].unit
							tooltip.push(tooltipText)
						} else {
							let value = data.data.value - data.data.last
							tooltipText = data.seriesName + ":" + value + optionData.seriesData[0].unit
							tooltip.push(tooltipText)
						}
					})
					return tooltip
				},
			},
			legend: {
				data: [],
				right: "1%",
				left: optionData.legendPosition || "right",
				top: "0%",
				width: "75%",
				borderRadius: "0",
				icon: "rect",
				selectedMode: false,
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				}
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: "8%",
				containLabel: true,
			},
			yAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						fontSize: nowSize(16),
						color: '#ffffff'
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
				},
			],
			xAxis: [
				{
					type: "value",
					// name:optionData.seriesData[0].unit,
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					// nameTextStyle: {
					// 	fontSize:nowSize(12),
					// 	color: '#ffffff'
					// },
					// nameGap:10,
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						show: false,
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "pictorialBar",
					symbol: optionData.symbol[0],
					data: optionData.seriesData[0].data,
					symbolSize: nowSize(13),
					symbolRepeat: true,
					symbolMargin: "15%",
					symbolClip: false,
					z: 5
				}
			],
		}
		return option
	},
	//块级柱状图
	getBlockLine: (optionData) => {
		let option = {
			grid: {
				top: "12%",
				left: '7%',
				right: '2%',
				bottom: "10%"
			},
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				formatter: function (item) {
					return item[0].axisValueLabel + '<br />' + item[0].seriesName + ': ' + item[0].data
				},
				transitionDuration: 0,
			},
			xAxis: {
				data: optionData.categoryAxis,
				axisLabel: {
					textStyle: {
						color: "#fff",
						fontSize: nowSize(16),
					},
					rotate: optionData.rotate || 0,
				},
				axisLine: {
					show: false, //隐藏X轴轴线
					lineStyle: {
						color: '#2D455A'
					}
				},
				axisTick: {       //y轴刻度线
					show: false
				},
			},
			yAxis: [{
				name: optionData.unit,
				nameTextStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: [0, -15, -5, 0]
				},
				axisTick: {       //y轴刻度线
					show: false
				},
				type: "value",
				splitLine: {
					show: true,
					lineStyle: {
						type: 'solid',
						color: 'rgba(60,79,135,.3)',
						width: 1
					}
				},
				axisLine: {
					show: false,
				},
				axisLabel: {
					show: true,
					textStyle: {
						color: "#fff",
						fontSize: nowSize(16),
					}
				},
			},],
			series: [{
				name: optionData.title,
				type: "bar",
				barWidth: 16,
				itemStyle: {
					normal: {
						color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0,
							color: optionData.LinearGradientColor[0].topColor
						},
						{
							offset: 1,
							color: optionData.LinearGradientColor[0].bottomColor
						}
						])
					}
				},
				data: optionData.seriesData,
				z: 0,
				zlevel: 0,
			},
			{
				type: "pictorialBar",
				itemStyle: {
					normal: {
						color: "#011140"
					}
				},
				symbolRepeat: "fixed",
				symbolMargin: 5,
				symbol: "rect",
				symbolClip: true,
				symbolSize: [17, 2],
				symbolPosition: "start",
				symbolOffset: [0, 0],
				data: optionData.seriesData,
				z: 1,
				zlevel: 0,
			},
			{
				name: optionData.title,
				type: "bar",
				barGap: "-125%",
				barWidth: 20,
				itemStyle: {
					normal: {
						color: "transparent",
						barBorderWidth: 1,
						label: {
							show: false,
							position: "top"
						}
					}
				},
				z: 2
			}
			]
		}
		return option
	},
	// 带边框饼图
	getBorderPie: (optionData) => {
		let unit = optionData.unit;
		let option = {
			tooltip: {
				trigger: 'item',
				formatter: "{a} <br/>{b}: {c} " + unit + "({d}%)",
				transitionDuration: 0,
			},
			legend: {
				show: optionData.legendShow === false ? optionData.legendShow : true,
				orient: optionData.legendorient ? optionData.legendorient : 'vertical',
				right: optionData.right || '9%',
				top: optionData.top || 'middle',
				textStyle: {
					rich: {
						a: {
							color: '#7CB1E2',
							fontsize: optionData.fontsize || nowSize(16),
							lineHeight: optionData.lineHeight || 18,
						},
						b: {
							fontSize: optionData.fontsize || nowSize(16),
							color: '#7ABFFF',
							align: 'center',
							padding: [0, 0, 0, 15],
							lineHeight: optionData.lineHeight || 18,
						}
					}
				},
				icon: "circle",
				formatter: function (param) {
					let total = 0;
					let target;
					for (let i = 0, l = optionData.seriesData.length; i < l; i++) {
						total += parseFloat(optionData.seriesData[i].value);
						if (optionData.seriesData[i].name === param) {
							target = optionData.seriesData[i].value;
						}
					}
					let arr = [
						'{a|' + param + '}',
						'{b|' + ((target / total) * 100).toFixed(2) + '%}'
					];
					return arr.join('')
				}
			},
			color: optionData.color,
			series: [
				{
					name: optionData.title,
					type: 'pie',
					// selectedMode:'single',
					radius: ['54%', '78%'],
					center: optionData.seriesCenter || ['40%', '50%'],
					avoidLabelOverlap: false,
					label: {
						normal: {
							show: optionData.labelLine || false,
							position: optionData.labelLineposition ? optionData.labelLineposition : 'center'
						},
					},
					emphasis: {
						label: {
							show: false,
							formatter: function (params) {
								let value = '';
								value = '{a|' + params.data.name + '}\r\n' + '{b|' + params.percent + '%' + '}';
								return value;
							},
							rich: {
								a: {
									color: '#74B7F5',
									fontSize: nowSize(16),
									lineHeight: 22
								},
								b: {
									color: '#fff',
									fontSize: nowSize(16),
									lineHeight: 32
								}
							}
						},
					},
					labelLine: {
						normal: {
							show: optionData.labelLine || false,
						}
					},
					itemStyle: {
						borderWidth: 0, //设置border的宽度有多大
						borderColor: "rgba(19,28,105,0.5)",
					},
					data: optionData.seriesData
				},
				{ //内边框背景
					radius: ['47%', '60%'],
					center: optionData.seriesCenter || ['40%', '50%'],
					type: 'pie',
					label: {
						normal: {
							show: false
						},
						emphasis: {
							show: false
						}
					},
					labelLine: {
						normal: {
							show: false
						},
						emphasis: {
							show: false
						}
					},
					animation: false,
					tooltip: {
						show: false
					},
					data: [{
						value: 9,
						itemStyle: {
							color: "rgba(0,0,0,0.3)",
						},
					}],
					zlevel: 999,
				}
			]
		}
		return option
	},
	//多个圆环图嵌套
	getMultiPie: (optionData) => {
		// var color = ['#fb734e', '#e32f46', '#94d96c', '#0bbcb7', '#1a9bfc', '#7049f0'];
		var dataStyle = {
			normal: {
				label: {
					show: false
				},
				labelLine: {
					show: false
				},
				shadowBlur: 40,
				borderWidth: 10,
				shadowColor: 'rgba(0, 0, 0, 0)' //边框阴影
			}
		};
		var placeHolderStyle = {
			normal: {
				color: 'rgba(0, 155, 180, 0.4)',
				label: {
					show: false
				},
				labelLine: {
					show: true
				}
			},
			emphasis: {
				color: 'rgba(0, 155, 180, 0.4)'
			}
		};



		var seriesArr = []
		for (var i = 0; i < optionData.seriesData.length; i++) {
			let radius = JSON.parse(JSON.stringify(optionData.radius));
			let seriesItem = {
				// name: 'Line 1',
				type: 'pie',
				clockWise: true,
				radius: '',
				center: ['50%', '50%'],
				itemStyle: dataStyle,
				hoverAnimation: false,
				startAngle: 90,
				label: {
					borderRadius: '10',
				},
				data: [{
					value: '',
					name: '',
					itemStyle: {
						normal: {
							color: '',
						}
					}
				},
				{
					value: '',
					name: '',
					tooltip: {
						show: false
					},
					itemStyle: placeHolderStyle
				},
				]
			}
			radius[0] = optionData.radius[0] - (i * 20);
			radius[1] = optionData.radius[1] - (i * 20);
			seriesItem.radius = radius;
			seriesItem.data[0].itemStyle.normal.color = optionData.color[i]
			seriesItem.data[0].name = optionData.seriesData[i].name
			seriesItem.data[0].value = optionData.seriesData[i].value
			seriesItem.data[1].value = optionData.total - optionData.seriesData[i].value
			seriesArr.push(seriesItem)
		}


		let option = {
			tooltip: {
				trigger: 'item',
				show: true,
				formatter: "{b} : <br/>{d}%",
				backgroundColor: 'rgba(0,0,0,0.7)', // 背景
				padding: [8, 10], //内边距
				extraCssText: 'box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);', //添加阴影
			},
			grid: {
				// top: '20%',
				// bottom: '20%',
				// left: "50%",
				containLabel: false
			},
			legend: {
				orient: 'vertical',
				// icon: 'circle',
				left: '30',
				top: 'middle',
				itemGap: 40,
				icon: "circle",
				data: optionData.legendData,
				textStyle: {
					color: '#fft'
				}
			},
			series: seriesArr
		};
		return option
	},
	//玫瑰图
	getRosePie: (optionData) => {
		let option = {
			// grid: {
			// 	top: "12%",
			// 	left: '20%',
			// 	right: '2%',
			// 	bottom: "10%"
			// },
			legend: {
				orient: 'vertical',
				icon: "circle",
				right: '20%',
				top: 'middle',
				textStyle: {
					color: '#fff'
				},
			},
			color: ["#0CFCFF",
				"#00BDFB",
				"#1FFF9E",
				"#FDD230",
				"#FDFA4E",
				"#FF4848"],
			tooltip: {
				trigger: 'item',
				formatter: '{b} : {c} ({d}%)'
			},
			series: [
				{
					type: "pie",
					radius: ["34%", "63%"],
					center: ["26%", "50%"],
					roseType: "radius",
					label: {
						show: false,
						formatter: '{b} ({d}%)'
					},
					emphasis: {
						label: {
							show: false
						}
					},
					data: optionData.seriesData
				}
			]
		};
		return option
	},
	// 外发光仪表盘
	getDashBoardPie: (optionData) => {
		var data = {
			value: [100],
		};
		var color = ['rgba(31, 255, 158, 1)', 'rgba(31, 255, 158, 1)', 'rgba(31, 255, 158, 1)']
		let option = {
			title: {
				text: optionData.titleText + '%',
				textStyle: {
					color: color[2],
					fontSize: 30,
					lineHeight: 32
				},
				itemGap: 20,
				left: 'center',
				top: 'center'
			},
			graphic: [{
				type: 'text',
				z: 100,
				left: 'center',
				top: '86%',
				style: {
					fill: '#fff',
					font: '30px Microsoft YaHei'
				}
			}],
			tooltip: {
				trigger: 'item',
				formatter: "{b}: {c} %",
				transitionDuration: 0,
			},
			angleAxis: {
				max: 100,
				clockwise: false, // 逆时针
				// 隐藏刻度线
				show: false,
				startAngle: 110,
			},
			radiusAxis: {
				type: 'category',
				show: true,
				axisLabel: {
					show: false,
				},
				axisLine: {
					show: false,

				},
				axisTick: {
					show: false
				},
			},
			polar: [{
				center: ['50%', '50%'], //中心点位置
				radius: '120%' //图形大小
			}],
			series: [{
				name: '小环',
				type: 'gauge',
				splitNumber: 12,
				radius: '90%',
				center: ['50%', '50%'],
				startAngle: 0,
				endAngle: 359.9999,
				axisLine: {
					show: false
				},
				axisTick: {
					show: true,
					lineStyle: {
						color: color[1],
						width: 3.5,
						shadowBlur: 1,
						shadowColor: color[1],
					},
					length: 20,
					splitNumber: 3
				},
				splitLine: {
					show: false
				},
				axisLabel: {
					show: false
				},
				detail: {
					show: false
				}
			}, {
				type: 'bar',
				z: 10,
				data: optionData.seriesData,
				showBackground: false,
				backgroundStyle: {
					color: color[1],
					borderWidth: 10,
					width: 10
				},
				coordinateSystem: 'polar',
				// roundCap: true,
				barWidth: 10,
				itemStyle: {
					normal: {
						opacity: 1,
						color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [{
							offset: 0,
							color: color[0]
						}, {
							offset: 1,
							color: color[1]
						}]),
						shadowBlur: 5,
						shadowColor: '#2A95F9',
					}
				},
			},
			{
				type: 'pie',
				name: '内层细圆环',
				radius: ['63%', '60%'],
				startAngle: 110,
				hoverAnimation: false,
				clockWise: true,
				itemStyle: {
					normal: {
						color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [{
							offset: 0,
							color: color[0]
						}, {
							offset: 1,
							color: color[1]
						}]),
					}
				},
				tooltip: {
					show: false,
				},
				label: {
					show: false
				},
				data: data.value
			}
			]
		}
		return option
	},
	//锥形图和折线图
	getPictorialBarAndLine: (optionData) => {
		let option = {
			color: ["#03cefa", "#fd664d", "#f1db25"],
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				data: [
					{
						name: optionData.seriesData[0].name,
						icon: "rect",
					},
					{
						name: optionData.seriesData[1].name,
					},
				],
				left: "right",
				top: "4%",
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
				{
					name: optionData.seriesData[1].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: 'pictorialBar',
					barCategoryGap: "40%",
					symbol: 'path://d="M150 50 L130 130 L170 130  Z"',
					data: optionData.seriesData[0].data,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					},
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							}, {
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}]),
						}
					}
				},
				{
					name: optionData.seriesData[1].name,
					type: "line",
					data: optionData.seriesData[1].data,
					symbol: "circle",
					yAxisIndex: 1,
					symbolSize: 7,
					itemStyle: {
						color: optionData.LineCircleColor,
						borderColor: optionData.LineCircleBorderColor,
					},
				}
			],
		}
		return option
	},
	//锥形图和折线图2
	getPictorialBarAndLine2: (optionData) => {
		let option = {
			color: ["#03cefa", "#fd664d", "#f1db25"],
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
        },
        formatter: function (params) {
          return params[0].name + '</br>' + params[0].seriesName + ' : ' + params[0].value + optionData.seriesData[0].unit
          + '</br>' + params[1].seriesName + ' : ' + params[1].value + optionData.seriesData[1].unit
        },
				transitionDuration: 0,
			},
			// legend: {
			// 	data: [
			// 		{
			// 			name: optionData.seriesData[0].name,
			// 			icon: "rect",
			// 		},
			// 		{
			// 			name: optionData.seriesData[1].name,
			// 		},
			// 	],
			// 	left: "center",
			// 	top: "4%",
			// 	borderRadius: "0",
			// 	itemWidth: nowSize(15),
			// 	itemHeight: nowSize(9),
			// 	textStyle: {
			// 		color: "#ffffff",
			// 		fontSize: nowSize(16),
			// 		padding: 0
			// 	},
			// },
			grid: {
				top: '20%',
				left: "3%",
				right: "4%",
				bottom: "3%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
				{
					name: optionData.seriesData[1].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: 'pictorialBar',
					barCategoryGap: "70%",
					symbol: 'path://d="M150 50 L130 130 L170 130  Z"',
					data: optionData.seriesData[0].data,
					backgroundStyle: {
						color: 'rgba(85, 111, 181, 0.2)'
					},
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							}, {
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}]),
						}
					}
				},
				{
					name: optionData.seriesData[1].name,
					type: "line",
					smooth: true,
					data: optionData.seriesData[1].data,
					symbol: "none",
					yAxisIndex: 1,
					symbolSize: 7,
					areaStyle: {
						color: {
							type: 'linear',
							x: 0,
							y: 0,
							x2: 0,
							y2: 1,
							colorStops: [{
								offset: 0, color: '#0CFCFF' // 0% 处的颜色
							}, {
								offset: .3, color: 'rgba(12, 252, 255, 0.1)' // 100% 处的颜色
							}],
							global: false // 缺省为 false
						}

					},
					itemStyle: {
						color: optionData.LineCircleColor,
						borderColor: optionData.LineCircleBorderColor,
					},
				}
			],
		}
		return option
	},

	//带阴影的折线图
	getShadowLine: (optionData) => {
		let option = {
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				show: optionData.legendShow === 'no' ? false : true,
				data: [],
				icon: "rect",
				right: "2%",
				left: optionData.legendPosition || "right",
				width: "85%",
				top: "0%",
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: optionData.gridTop || "13%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						color: '#ffffff',
                        fontSize: nowSize(16),
                        rotate: optionData.labelRorate||optionData.rotate || 0
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, 0, -6, 0]
					},
					type: "value",
					min: optionData.min || null,
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				},
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: "line",
					data: optionData.seriesData[0].data,
					smooth: optionData.smooth || true,
					symbol: "circle",
					symbolSize: 7,
					itemStyle: {
						color: optionData.LinearGradientColor[0].LineCircleColor,
						borderColor: optionData.LinearGradientColor[0].LineCircleBorderColor,
					},
					areaStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							},
							{
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}
							], false),
						}
					},
				}
			],
		}
		return option
	},
	// 极坐标柱状图
	getpolarBar: (optionData) => {
		let option = {
			angleAxis: {
				type: 'category',
				boundaryGap: ['20%', '20%'],
				data: optionData.categoryAxis,
				z: 10,
				axisLine: { //坐标轴轴线设置
					show: true,
					lineStyle: {
						color: '#2b4081'
					}
				},
				axisLabel: { //刻度标签设置
					textStyle: {
						color: '#fff',
						fontSize: nowSize(16),
					}
				},
				axisTick: {
					show: false
				},
				splitLine: {
					show: true,
					lineStyle: {
						color: ['rgba(43,64,129,.6)', 'rgba(43,64,129,.6)']
					},
					interval: 0
				},
				axisPointer: {
					lineStyle: {
						color: 'rgba(43,64,129,.6)'
					}
				}
			},
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow',
				},
				formatter: "{b} <br/>{a}: {c}" + optionData.unit || "",
				transitionDuration: 0,
				confine: true,
			},
			radiusAxis: {
				axisLabel: {
					textStyle: {
						color: '#537cbd',
						fontSize: nowSize(16),
					}
				},
				axisLine: { //坐标轴轴线设置
					show: false,
				},
				axisTick: {
					show: false
				},
				splitLine: {
					lineStyle: {
						color: "rgba(43,64,129,.4)",
						type: "solid"
					}
				}
			},
			polar: {},
			series: [
				{
					type: 'bar',
					data: optionData.seriesData,
					coordinateSystem: 'polar',
					name: optionData.title,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(1, 0, 1, 1, [{
								offset: 0,
								color: optionData.bottomColor
							}, {
								offset: 1,
								color: optionData.topColor
							}]),
						},
					},
				},
			],
			legend: {
				show: false,
				data: []
			}
		}
		return option
	},
	// 横向柱状图
	getInfeedBar: (optionData) => {
		let datas = [];
		let dataMin = []
		optionData.seriesData.forEach(value => {
			datas.push(value.value);
		});
		datas.forEach(data => {
			dataMin.push(Math.min.apply(null, datas) / 20)
		})
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				formatter: "{b} <br/>{a}: {c}" + optionData.unit || "",
				transitionDuration: 0,
			},
			legend: {
				show: false,
				data: []
			},
			grid: {
				top: '2%',
				left: '4%',
				right: '4%',
				bottom: '0%',
				containLabel: true
			},
			xAxis: {
				type: 'value',
				// boundaryGap: [0, 0.01],
				axisLine: {
					show: false
				},
				splitLine: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisLabel: {
					interval: 0,
					color: ' #fff',
					align: 'right',
					margin: 10,
					fontSize: nowSize(16),
				},
			},
			yAxis: {
				type: 'category',
				data: optionData.categoryAxis,
				axisLine: {
					show: false
				},
				offset: 10,
				splitLine: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisLabel: {
					interval: 0,
					color: ' #fff',
					align: 'right',
					margin: 10,
					fontSize: nowSize(16),
				},
			},
			series: [
				{
					name: optionData.title,
					type: 'bar',
					data: optionData.seriesData,
					barWidth: 10,
					barGap: '-152%',
					itemStyle: {
						normal: {
							barBorderRadius: [10, 10, 10, 10],
							color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
								offset: 0,
								color: optionData.topColor
							},
							{
								offset: 1,
								color: optionData.bottomColor
							}
							]),
						}
					},
				},
				{
					// 背景条
					type: "pictorialBar",
					symbol: "rect",
					tooltip: {
						show: false
					},
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
								offset: 0,
								color: 'rgba(63, 239, 160,.25)'
							},
							{
								offset: 1,
								color: 'rgba(63, 239, 160,0)'
							}
							]),
						}
					},
					symbolOffset: [-10, 0],
					axisPointer: {
						type: 'none'
					},
					silent: false,
					barWidth: innerWidth <= 1400 ? 18 : 20,
					animationEasing: "elasticOut",
					data: optionData.seriesData
				},
			]
		}
		return option
	},
	//双锥形柱状图
	getDoublePictorialBar: (optionData) => {
		let option = {
			tooltip: {
				show: true,
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				icon: "rect",
				right: "2%",
				top: "4%",
				left: optionData.legendPostion || 'right',
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				containLabel: true,
			},
			xAxis: [
				{
					type: "category",
					data: optionData.categoryAxis,
					axisLabel: {
						interval: 0,
						fontSize: nowSize(16),
						color: '#ffffff'
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						lineStyle: {
							color: '#3c4f87',
							fontSize: nowSize(16),
						},
					},
				},
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
					},
					type: "value",
					axisLabel: {
						color: '#ffffff',
						fontSize: nowSize(16),
					},
					axisTick: {
						show: false,
					},
					axisLine: {
						show: false,
					},
					splitLine: {
						lineStyle: {
							color: 'rgba(24, 46, 97, 0.6)'
						}
					},
				}
			],
			series: [
				{
					name: optionData.seriesData[0].name,
					barWidth: 18,
					type: "pictorialBar",
					barCategoryGap: "40%",
					barGap: '2%',
					symbol: 'path://d="M150 50 L130 130 L170 130  Z"',
					showBackground: true,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[0].topColor
							},
							{
								offset: 1,
								color: optionData.LinearGradientColor[0].bottomColor
							}
							])
						}
					},
					data: optionData.seriesData[0].data
				},
				{
					name: optionData.seriesData[1].name,
					type: "pictorialBar",
					barWidth: 18,
					barCategoryGap: "40%",
					barGap: '2%',
					symbol: 'path://d="M150 50 L130 130 L170 130  Z"',
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: optionData.LinearGradientColor[1].topColor
							},
							{
								offset: 1,
								color: optionData.LinearGradientColor[1].bottomColor
							}
							])
						}
					},
					data: optionData.seriesData[1].data
				}
			],
		}
		return option
	},
	// 多列柱状图
	getMultiColumnBar: (optionData) => {
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
				formatter: function (item) {
					return optionData.title + '<br />' + item[0].name + '：' + item[0].value
				},
			},
			grid: [
				{
					//左侧1的柱状图grid
					width: "20%",
					left: '4%',
					top: '20',
					right: '0',
					bottom: '0%'
				},
				{
					//左侧2的柱状图grid
					width: "20%",
					left: '28%',
					top: '20',
					right: '0',
					bottom: '0'
				},
				{
					//右侧1的柱状图grid
					width: "20%",
					left: '51%',
					top: '20',
					right: '0',
					bottom: '0'
				},
				{
					//右侧2的柱状图grid
					width: "20%",
					left: '76%',
					top: '20',
					right: '0',
					bottom: '0'
				}
			],
			xAxis: [
				{
					//左侧1柱状图的X轴
					gridIndex: 0,//x 轴所在的 grid 的索引
					show: false,
					min: parseInt(optionData.min) - 2,
					max: parseInt(optionData.max)
				},
				{
					//左侧2柱状图的X轴
					gridIndex: 1,//x 轴所在的 grid 的索引
					show: false,
					min: parseInt(optionData.min) - 2,
					max: parseInt(optionData.max)
				}, {
					//左侧2柱状图的X轴
					gridIndex: 2,//x 轴所在的 grid 的索引
					show: false,
					min: parseInt(optionData.min) - 2,
					max: parseInt(optionData.max)
				}, {
					//左侧2柱状图的X轴
					gridIndex: 3,//x 轴所在的 grid 的索引
					show: false,
					min: parseInt(optionData.min) - 2,
					max: parseInt(optionData.max)
				},
			],
			yAxis: [
				{
					//左侧柱状图的Y轴
					gridIndex: 0,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					axisLabel: {
						verticalAlign: 'bottom',
						align: 'left',
						padding: window.innerWidth > 1366 ? [0, 0, 35, 150] : [0, 0, 22, 115],
						textStyle: {
							color: '#fff',
							fontSize: nowSize(14),
							align: 'center'
						}
					},
					data: optionData.seriesData[0].name,
					inverse: true,
				},
				{
					//左侧柱状图的Y轴
					gridIndex: 0,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					data: optionData.seriesData[0].value,
					inverse: true,
					axisLabel: {
						show: true,
						verticalAlign: 'bottom',
						align: 'right',
						padding: window.innerWidth > 1366 ? [0, 175, 15, 0] : [0, 125, 8, 0],
						textStyle: {
							color: '#fff',
							fontSize: nowSize(16),
							align: 'center'
						},
					}
				},
				{
					//左侧柱状图的Y轴
					gridIndex: 0,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					data: []
				},
				{
					//右侧柱状图的Y轴
					gridIndex: 1,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					axisLabel: {
						verticalAlign: 'bottom',
						align: 'left',
						padding: window.innerWidth > 1366 ? [0, 0, 35, 150] : [0, 0, 22, 115],
						textStyle: {
							color: '#fff',
							fontSize: nowSize(14),
							align: 'center'
						}
					},
					data: optionData.seriesData[1].name,
					inverse: true
				},
				{
					//右侧柱状图的Y轴
					gridIndex: 1,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					data: optionData.seriesData[1].value,
					inverse: true,
					axisLabel: {
						show: true,
						verticalAlign: 'bottom',
						align: 'right',
						padding: window.innerWidth > 1366 ? [0, 175, 15, 0] : [0, 125, 8, 0],
						textStyle: {
							color: '#fff',
							fontSize: nowSize(16),
							align: 'center'
						},
					},
				},
				{
					//右侧柱状图的Y轴
					gridIndex: 1,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					data: []
				},
				{
					//右侧柱状图的Y轴
					gridIndex: 2,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					axisLabel: {
						verticalAlign: 'bottom',
						align: 'left',
						padding: window.innerWidth > 1366 ? [0, 0, 35, 150] : [0, 0, 22, 115],
						textStyle: {
							color: '#fff',
							fontSize: nowSize(14),
							align: 'center'
						}
					},
					data: optionData.seriesData[2].name,
					inverse: true
				},
				{
					//右侧柱状图的Y轴
					gridIndex: 2,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					data: optionData.seriesData[2].value,
					inverse: true,
					axisLabel: {
						show: true,
						verticalAlign: 'bottom',
						align: 'right',
						padding: window.innerWidth > 1366 ? [0, 175, 15, 0] : [0, 125, 8, 0],
						textStyle: {
							color: '#fff',
							fontSize: nowSize(16),
							align: 'center'
						},
					},
				},
				{
					//右侧柱状图的Y轴
					gridIndex: 2,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					data: []
				},
				{
					//右侧柱状图的Y轴
					gridIndex: 3,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					axisLabel: {
						verticalAlign: 'bottom',
						align: 'left',
						padding: window.innerWidth > 1366 ? [0, 0, 35, 150] : [0, 0, 22, 115],
						textStyle: {
							color: '#fff',
							fontSize: nowSize(14),
							align: 'center'
						}
					},
					data: optionData.seriesData[3].name,
					inverse: true
				},
				{
					//右侧柱状图的Y轴
					gridIndex: 3,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					data: optionData.seriesData[3].value,
					inverse: true,
					axisLabel: {
						show: true,
						verticalAlign: 'bottom',
						align: 'right',
						padding: window.innerWidth > 1366 ? [0, 175, 15, 0] : [0, 125, 8, 0],
						textStyle: {
							color: '#fff',
							fontSize: nowSize(16),
							align: 'center'
						}
					},
				},
				{
					//右侧柱状图的Y轴
					gridIndex: 3,//y轴所在的 grid 的索引
					splitLine: 'none',
					axisTick: 'none',
					axisLine: 'none',
					data: []
				}
			],
			series: [
				{
					name: '',
					type: 'bar',
					xAxisIndex: 0,//使用的 x 轴的 index，在单个图表实例中存在多个 x 轴的时候有用。
					yAxisIndex: 0,//使用的 y 轴的 index，在单个图表实例中存在多个 y轴的时候有用。
					data: optionData.seriesData[0].value,
					barWidth: optionData.borderWidth,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
								offset: 0,
								color: optionData.leftColor
							}, {
								offset: 1,
								color: optionData.rightColor
							}], false),
							barBorderRadius: 6,
						}
					},
					z: 2
				},
				{
					name: '',
					type: 'bar',
					xAxisIndex: 0,//使用的 x 轴的 index，在单个图表实例中存在多个 x 轴的时候有用。
					yAxisIndex: 2,//使用的 y 轴的 index，在单个图表实例中存在多个 y轴的时候有用。
					barGap: '-100%',
					data: optionData.rows == 2 ? [optionData.max, optionData.max] : [optionData.max, optionData.max, optionData.max, optionData.max],
					barWidth: optionData.borderWidth,
					itemStyle: {
						normal: {
							color: '#2d5271',
							barBorderRadius: 6,
						}
					},
					z: 0
				},
				{
					name: '',
					type: 'bar',
					xAxisIndex: 1,//使用的 x 轴的 index，在单个图表实例中存在多个 x 轴的时候有用。
					yAxisIndex: 3,//使用的 y 轴的 index，在单个图表实例中存在多个 y轴的时候有用。
					data: optionData.seriesData[1].value,
					barWidth: optionData.borderWidth,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
								offset: 0,
								color: optionData.leftColor
							}, {
								offset: 1,
								color: optionData.rightColor
							}], false),
							barBorderRadius: 6,
						}
					},
					z: 2
				},
				{
					name: '',
					type: 'bar',
					xAxisIndex: 1,//使用的 x 轴的 index，在单个图表实例中存在多个 x 轴的时候有用。
					yAxisIndex: 5,//使用的 y 轴的 index，在单个图表实例中存在多个 y轴的时候有用。
					barGap: '-100%',
					data: optionData.rows == 2 ? [optionData.max, optionData.max] : [optionData.max, optionData.max, optionData.max, optionData.max],
					barWidth: optionData.borderWidth,
					itemStyle: {
						normal: {
							color: '#2d5271',
							barBorderRadius: 6,
						}
					},
					z: 0
				},
				{
					name: '',
					type: 'bar',
					xAxisIndex: 2,//使用的 x 轴的 index，在单个图表实例中存在多个 x 轴的时候有用。
					yAxisIndex: 6,//使用的 y 轴的 index，在单个图表实例中存在多个 y轴的时候有用。
					data: optionData.seriesData[2].value,
					barWidth: optionData.borderWidth,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
								offset: 0,
								color: optionData.leftColor
							}, {
								offset: 1,
								color: optionData.rightColor
							}], false),
							barBorderRadius: 6,
						}
					},
					z: 2
				},
				{
					name: '',
					type: 'bar',
					xAxisIndex: 2,//使用的 x 轴的 index，在单个图表实例中存在多个 x 轴的时候有用。
					yAxisIndex: 6,//使用的 y 轴的 index，在单个图表实例中存在多个 y轴的时候有用。
					barGap: '-100%',
					data: optionData.rows == 2 ? [optionData.max, optionData.max] : [optionData.max, optionData.max, optionData.max, optionData.max],
					barWidth: optionData.borderWidth,
					itemStyle: {
						normal: {
							color: '#2d5271',
							barBorderRadius: 6,
						}
					},
					z: 0
				},
				{
					name: '',
					type: 'bar',
					xAxisIndex: 3,//使用的 x 轴的 index，在单个图表实例中存在多个 x 轴的时候有用。
					yAxisIndex: 9,//使用的 y 轴的 index，在单个图表实例中存在多个 y轴的时候有用。
					data: optionData.seriesData[3].value,
					barWidth: optionData.borderWidth,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
								offset: 0,
								color: optionData.leftColor
							}, {
								offset: 1,
								color: optionData.rightColor
							}], false),
							barBorderRadius: 6,
						}
					},
					z: 2
				},
				{
					name: '',
					type: 'bar',
					xAxisIndex: 3,//使用的 x 轴的 index，在单个图表实例中存在多个 x 轴的时候有用。
					yAxisIndex: 9,//使用的 y 轴的 index，在单个图表实例中存在多个 y轴的时候有用。
					barGap: '-100%',
					data: optionData.rows == 2 ? [optionData.max, optionData.max] : [optionData.max, optionData.max, optionData.max, optionData.max],
					barWidth: optionData.borderWidth,
					itemStyle: {
						normal: {
							color: '#2d5271',
							barBorderRadius: 6,
						}
					},
					z: 0
				}
			]
		}
		return option
	},
	//两个个块级柱状图+折线
	getDoubleBlockLine: (optionData) => {
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
				formatter: function (item) {
					let str = ""
					let unit = ""
					if (optionData.isLine) {
						if (item.length == 1) {
							unit = "万元"
							str = optionData.title + '<br />' + item[0].seriesName + '：' + item[0].value + unit
						} else if (item.length === 2) {
							console.log(item)
							if (item[0].seriesName == "四上企业数量") {
								unit = "个"
							} else {
								unit = "人"
							}
							str = optionData.title + '<br />' + item[0].seriesName + '：' + item[0].value + unit
						} else if (item.length === 4) {
							str = optionData.title + '<br />' + item[0].seriesName + '：' + item[0].value + '个' +
								'<br />' + item[3].seriesName + '：' + item[3].value + '万元'
						} else if (item.length === 3) {
							if (item[0].seriesName == "四上企业数量") {
								unit = "个"
							} else {
								unit = "人"
							}
							str = optionData.title + '<br />' + item[0].seriesName + '：' + item[0].value + unit +
								'<br />' + item[2].seriesName + '：' + item[2].value + '万元'
						} else if (item.length === 5) {
							str = optionData.title + '<br />' + item[0].seriesName + '：' + item[0].value + '个' +
								'<br />' + item[2].seriesName + '：' + item[2].value + '人' + (optionData.isLine ?
									'<br />' + item[4].seriesName + '：' + item[4].value + '万元' : '')
						} else {
							str = ""
						}
					} else {
						if (item.length === 2) {
							str = optionData.title + '<br />' + item[0].seriesName + '：' + item[0].value + '元'
						} else if (item.length === 4) {
							str = optionData.title + '<br />' + item[0].seriesName + '：' + item[0].value + '元' +
								'<br />' + item[3].seriesName + '：' + item[3].value + '元'
						} else {
							str = ''
						}
					}
					return str
					// return optionData.title + '<br />' + item[0].seriesName + '：' + item[0].value + '<br />' + item[item.length == 2 ? 1 : 2].seriesName + '：' + item[item.length == 2 ? 1 : 2].value + (optionData.isLine ? '<br />' + item[4].seriesName + '：' + item[4].value : '')
				},
			},
			legend: {
				show: true,
				icon: "rect",
				right: "2%",
				top: optionData.isLine ? '1%' : '4%',
				left: optionData.legendPostion || 'right',
				borderRadius: "0",
				itemWidth: nowSize(15),
				itemHeight: nowSize(9),
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
				data: [optionData.seriesData[0].name, optionData.seriesData[1].name, optionData.isLine ? optionData.seriesData[2].name : ''],
			},
			grid: {
				top: optionData.isLine ? '15%' : '10%',
				right: optionData.isLine ? '7.5%' : '3.5%',
				bottom: '10%',
				left: '7.5%'
			},
			xAxis: {
				data: optionData.categoryAxis,
				type: 'category',
				axisLine: {
					show: false, //隐藏X轴轴线
					lineStyle: {
						color: '#2D455A'
					}
				},
				axisTick: {
					show: false //隐藏X轴刻度
				},
				axisLabel: {
					show: true,
					margin: 14,
					fontSize: nowSize(16),
					textStyle: {
						color: '#ffffff' //X轴文字颜色
					}
				}
			},
			yAxis: [{
				name: optionData.seriesData[0].unit,
				nameTextStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: [0, 20, -5, 0]
				},
				type: 'value',
				gridIndex: 0,
				// splitNumber: 4,
				splitLine: {
					show: true,
					lineStyle: {
						type: 'solid',
						color: 'rgba(60,79,135,.3)',
						width: 1
					}
				},
				axisTick: {
					show: false
				},
				axisLine: {
					show: false
				},
				axisLabel: {
					show: true,
					fontSize: nowSize(16),
					textStyle: {
						color: '#ffffff' //X轴文字颜色
					}
				}
			}, {
				name: optionData.isLine ? optionData.seriesData[2].unit : '',
				nameTextStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: [0, 20, -5, 0]
				},
				type: 'value',
				gridIndex: 0,
				// splitNumber: 4,
				splitLine: {
					show: true,
					lineStyle: {
						type: 'solid',
						color: 'rgba(60,79,135,.3)',
						width: 1
					}
				},
				axisTick: {
					show: false
				},
				axisLine: {
					show: false
				},
				axisLabel: {
					show: true,
					fontSize: nowSize(16),
					textStyle: {
						color: '#ffffff' //X轴文字颜色
					}
				}
			},],
			series: [
				{
					name: optionData.seriesData[0].name,
					type: 'bar',
					barWidth: 18,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
								offset: 0,
								color: optionData.BarGradientColor[0].topColor
							},
							{
								offset: 1,
								color: optionData.BarGradientColor[0].bottomColor
							}
							])
						}
					},
					data: optionData.seriesData[0].data,
					z: 10,
					zlevel: 0,
				},
				{
					// 分隔
					name: optionData.seriesData[0].name,
					type: 'pictorialBar',
					itemStyle: {
						normal: {
							color: '#0F375F'
						}
					},
					barWidth: 18,
					symbolRepeat: 'fixed',
					symbolMargin: 5,
					symbol: 'rect',
					smooth: true, //是否平滑
					showAllSymbol: true,
					symbolClip: true,
					// barGap: '-128%',
					symbolSize: [18, 2],
					symbolPosition: 'start',
					// symbolOffset: [-12, -1],
					// symbolBoundingData: this.total,
					data: optionData.seriesData[0].data,
					z: 11,
					zlevel: 1
				},
				{
					name: optionData.seriesData[1].name,
					type: 'bar',
					barWidth: 18,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
								offset: 0,
								color: optionData.BarGradientColor[1].topColor
							},
							{
								offset: 1,
								color: optionData.BarGradientColor[1].bottomColor
							}
							])
						}
					},
					data: optionData.seriesData[1].data,
					z: 11,
					zlevel: 0
				},
				{
					// 分隔
					name: optionData.seriesData[1].name,
					type: 'pictorialBar',
					itemStyle: {
						normal: {
							color: '#0F375F'
						}
					},
					barWidth: 18,
					symbolRepeat: 'fixed',
					symbolMargin: 5,
					symbol: 'rect',
					smooth: true, //是否平滑
					showAllSymbol: true,
					symbolClip: true,
					symbolSize: [18, 2],
					// symbolOffset: [12, -1],
					barGap: '30%',
					// symbolBoundingData: this.total,
					data: optionData.seriesData[1].data,
					z: 0,
					zlevel: 1
				},
				{
					name: optionData.isLine ? optionData.seriesData[2].name : '',
					show: false,
					yAxisIndex: 1,
					type: 'line',
					symbolRepeat: 'fixed',
					smooth: true, //是否平滑
					showAllSymbol: true,
					symbol: 'circle',
					symbolSize: 10,
					lineStyle: {
						normal: {
							color: optionData.lineColor.linearColor,
						},
					},
					data: optionData.isLine ? optionData.seriesData[2].data : [],
					z: 99,
					zlevel: 9999999999,
					itemStyle: {
						color: optionData.lineColor.radiusColor,
						borderColor: optionData.lineColor.borderColor,
						borderWidth: 1,
					},
				}
			]
		}
		return option
	},
	// 横向三角柱状图+飞机
	getTransverseBar: (optionData) => {
		let src = optionData.imgSrc
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				show: false
			},
			grid: {
				left: '3%',
				top: '5%',
				right: '12%',
				bottom: '3%',
				containLabel: true
			},
			xAxis: [{
				name: '(' + optionData.unit + ')',
				nameTextStyle: {
					padding: [27, 0, 0, 0],
					color: "#fff"
				},
				splitLine: {
					show: false
				},
				type: 'value',
				show: true,
				axisLine: { //y轴
					show: false
				},
				axisTick: {
					show: false
				},
				axisLabel: {
					color: '#fff',
					fontSize: nowSize(16),
				}
			}],
			yAxis: [{
				splitLine: {
					show: false
				},
				axisLine: { //y轴
					show: false
				},
				type: 'category',
				axisTick: {
					show: false
				},
				data: optionData.categoryAxis,
				axisLabel: {
					color: '#fff',
					fontSize: nowSize(16),
				}
			}],
			series: [
				{
					name: optionData.title,
					barWidth: 16,
					type: "pictorialBar",
					barCategoryGap: "40%",
					barGap: '2%',
					symbol: 'path://d="path://M6 4 l20 12-20 10 z"',
					showBackground: true,
					label: {
						show: true,
						position: 'right',
						textStyle: {     //数值样式
							color: 'rgba(0,0,0,0)',
							fontSize: nowSize(15)
						},
						backgroundColor: {
							image: src
						},
					}, // 柱子上方的数值
					itemStyle: {
						barBorderRadius: [20, 20, 20, 20], // 圆角（左上、右上、右下、左下）
						color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
							optionData.topColor, optionData.bottomColor
						].map((color, offset) => ({
							color,
							offset
						}))), // 渐变
					},
					data: optionData.seriesData
				},
			]
		}
		return option
	},
	// 公司关系图-1
	getRelationMap: (optionData) => {
		// let src = require('../assets/images/topcenter.png')
		let src = require('../assets/images/topcenter.png')
		let src1 = require('../assets/images/maptabx.png')
		let src2 = require('../assets/images/maptabS1.png')
		let links = []
		let mapData = [{
			name: optionData.title,
			symbolSize: [230, 200],
			symbol: 'image://' + src + '',
			x: 80,
			y: 150,
			label: {
				color: '#fff',
				fontSize: nowSize(14),
				formatter: function (params) {
					return params.name.length > 7 ? '{a|' + params.name.substring(0, 7) + '}\n' + '{b|' + params.name.substring(7, params.name.length) + '}' : '{a|' + params.name.substring(0, 7) + '}';
				},
				rich: {
					a: {
						color: '#fff',
						fontSize: nowSize(18),
						lineHeight: optionData.title.length < 7 ? 500 : 32,
						align: 'center'
					},
					b: {
						color: '#fff',
						fontSize: nowSize(18),
						lineHeight: 32,
						align: 'center'
					}
				}
			},
		}]	
		optionData.seriesData.leftList.forEach((item, index, arr) => {
			let leftList = {}
			leftList = {
				showName:item.name,
				name: item.id,
				symbol: 'image://' + src1 + '',
				x: -250,
				y: -55 + (index * 300),
				symbolSize: [128, 32],
				label: {
					color: 'rgba(12, 252, 255, 1)',
					fontSize: nowSize(15),
				},
			}
			mapData.push(leftList)
			links.push(
				{
					source: optionData.title,
					value: " ",
					target: item.id,
				}
			)
			item.data.forEach((itm, ins, ar) => {
				let branchList = {}
				branchList = {
					showName:itm.name,
					name: itm.name,
					value: '1',
					indexId: itm.id,
					x: -550,
					// y: index === 0 ? -350 + ins * 30 : index === 1 ? 10 + ins * 30 : 700 + ins * 30,
					y: index === 0 ? -150 + ins * 30 : index === 1 ? 100 + ins * 30 : 400 + ins * 30,
					symbol: 'image://' + src1 + '',
					symbolSize: itm.name.length <= 4 ? [150, 22] : [280, 22],
					label: {
						color: '#fff',
						fontSize: nowSize(16),
						fontWeight: 'normal'
					},
					borderColor: '#ggg'
				}
				links.push(
					{
						source: item.id,
						value: " ",
						target: itm.name,
					}
				)
				mapData.push(branchList)
			})
		})
		optionData.seriesData.rightList.forEach((item, index, arr) => {
			let rightList = {}
			rightList = {
				showName:item.name,
				name: item.name,
				x: 420,
				y: -55 + (index * 300),
				symbol: 'image://' + src1 + '',
				symbolSize: [128, 32],
				label: {
					color: 'rgba(12, 252, 255, 1)',
					fontSize: nowSize(15),
				},
			}
			mapData.push(rightList)
			links.push(
				{
					source: optionData.title,
					value: " ",
					target: item.name,
				}
			)

			item.data.forEach((itm, ins, ar) => {
				let branchList = {}
				branchList = {
					showName:itm.name,
					name: itm.name,
					value: '1',
					indexId: itm.id,
					x: 760,
					y: index === 0 ? -150 + ins * 30 : index === 1 ? 100 + ins * 30 : 400 + ins * 30,
					symbol: 'image://' + src1 + '',
					symbolSize: itm.name.length <= 4 ? [150, 22] : [280, 22],
					label: {
						color: '#fff',
						fontSize: nowSize(16),
						fontWeight: 'normal'
			    },
				}
				links.push(
					{
						source: item.name,
						value: " ",
						target: itm.name,
					}
				)
				mapData.push(branchList)
			})

		})
		let option = {
			textStyle: {
				color: '#333',
				fontSize: nowSize(16),
				fontWeight: 600,
			},
			animationDurationUpdate: 1500,
			animationEasingUpdate: 'quinticInOut',
			xAxis: {
				show: false,
				type: 'value'
			},
			yAxis: {
				show: false,
				type: 'value'
			},
			series: [{
				type: 'graph',
				layout: 'none',
				zoom: optionData.zoom,
				edgeSymbol: ['circle', 'none'],//triangle
				edgeSymbolSize: [6, 15],
				edgeLabel: {
					show: false,
					normal: {
						show: true,
						position: 'middle',
						textStyle: {
							fontSize: nowSize(12)
						},
						formatter: "{c}"
					}
				},
				focusNodeAdjacency: optionData.focusNodeAdjacency || false,
				roam: true,
				//圆形上面的文字
				label: {
					normal: {
						position: "inside",
						show: true,
						textStyle: {
							fontSize: nowSize(16),
							barBorderRadius: 0,
						},
						formatter: function(params){
							return params.data.showName
						}
					},
				},
				
				leaves: {
					label: {
						show: true,
						position: 'right',
						verticalAlign: 'middle',
						align: 'left'
					}
				},
				lineStyle: {
					normal: {
						width: 2,
						shadowColor: 'none',
						color: 'rgba(12, 252, 255, 1)',
						// curveness: .1
					},
				},
				data: mapData,
				links: links,
			}]
		}
		console.log('mapData', JSON.stringify(mapData))
		console.log('option', JSON.stringify(option))
	//	console.log('option', JSON.stringify(links))
		return option
	},
	// 二级关系图2
	getRelationMap2: (optionData) => {
		var src = require('../assets/images/topcenter.png')
		var src1 = require('../assets/images/maptabx.png')
		var src2 = require('../assets/images/maptabS1.png')
		var links = []
		var mapData = [{
			name: optionData.title,
			symbolSize: [200, 80],
			symbol: 'circle',//'image://'+src+'',
			x: 80,
			y: 150,
			label: {
				color: '#fff',
				fontSize: nowSize(14),
				formatter: function (params) {
					return params.name.length > 7 ? '{a|' + params.name.substring(0, 7) + '}\n' + '{b|' + params.name.substring(7, params.name.length) + '}' : '{a|' + params.name.substring(0, 7) + '}';
				},
				rich: {
					a: {
						color: '#fff',
						fontSize: nowSize(18),
						lineHeight: optionData.title.length < 7 ? 500 : 32,
						align: 'center'
					},
					b: {
						color: '#fff',
						fontSize: nowSize(18),
						lineHeight: 26,
						align: 'center'
					}
				}
			},
			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
						offset: 0,
						color: '#1b79b6'
					},
					{
						offset: 1,
						color: '#2296e2'
					}
					]),
					shadowColor: 'rgba(0, 0, 0, 0.5)',
					shadowBlur: 10,
					shadowOffsetX: -1
				}
			}
		}]
		optionData.seriesData.forEach((item, index, arr) => {
			let leftList = {
				name: item.name,
				symbol: 'image://' + src1 + '',
				// x: index>=(arr.length/2)?480:-280,
				// y: 30+(index*100),
				symbolSize: [128, 32],
				label: {
					color: '#61DDF4',
					fontSize: nowSize(15),
				},
			}
			mapData.push(leftList)
			links.push(
				{
					source: optionData.title,
					value: " ",
					target: item.name,
				}
			)
		})
		let option = {
			textStyle: {
				color: '#333',
				fontSize: nowSize(16),
				fontWeight: 600,
			},
			xAxis: {
				show: false,
				type: 'value'
			},
			yAxis: {
				show: false,
				type: 'value'
			},
			series: [{
				type: 'graph',
				zoom: optionData.zoom,
				// animation:false,
				animationDurationUpdate: 100,
				animationEasingUpdate: 'cubicIn',
				edgeSymbol: ['circle', 'none'],//triangle
				edgeSymbolSize: [6, 15],
				edgeLabel: {
					show: false,
					normal: {
						show: true,
						position: 'middle',
						textStyle: {
							fontSize: nowSize(12)
						},
						formatter: "{c}"
					}
				},
				focusNodeAdjacency: false,
				roam: true,
				//圆形上面的文字
				label: {
					normal: {
						position: "inside",
						show: true,
						textStyle: {
							fontSize: nowSize(16),
							barBorderRadius: 0,
						},
					},
				},
				leaves: {
					label: {
						show: true,
						position: 'right',
						verticalAlign: 'middle',
						align: 'left'
					}
				},
				lineStyle: {
					normal: {
						width: 2,
						shadowColor: 'none',
						color: '#2D96E8',
						// curveness: .1
					},
				},
				data: mapData,
				force: {
					repulsion: 4000,
					layoutAnimation: false
				},
				layout: 'force',
				links: links,
			}]
		}
		// console.log(mapData)
		return option
	},
	//水平柱
	getshuipingBar(optionData) {
		console.log('optionData', optionData)
		var baccolor = ['#0CFCFF', '#FDD230'];
		var categoryAxis = optionData.categoryAxis
		var data = optionData.data
		var totalList = optionData.totalList
		let option = {
			// tooltip: {
			// 	trigger: 'axis',
			// 	axisPointer: {
			// 		type: 'shadow',
			// 	},
			// },
			legend: {
				show: false,
			},
			grid: {
				left: 120,
			},
			toolbox: {
				show: false,
				feature: {
					saveAsImage: {},
				},
			},
			xAxis: {
				max: totalList[0],
				splitLine: {
					show: false
				},
				axisLine: {
					show: false
				},
				axisLabel: {
					show: false
				},
				axisTick: {
					show: false
				}
			},
			yAxis:
			{
				type: 'category',
				//  offset:-20,
				padding: 50,
				// boundaryGap: ['20%', '20%'],
				inverse: true,
				z: 5,
				axisLine: {
					show: false,
				},
				axisTick: {
					show: false,
				},
				axisPointer: {
					label: {
						show: false,
						margin: 30,
					},
				},
				data: categoryAxis,
				axisLabel: {
					margin: 100,
					fontSize: 14,
					align: 'left',
					color: '#333',
					rich: {
						a1: {
							color: '#fff',
							backgroundColor: baccolor[0],
							width: 30,
							height: 30,
							align: 'center',
							borderRadius: 5,
						},
						a2: {
							color: '#fff',
							backgroundColor: baccolor[0],
							width: 30,
							height: 30,
							align: 'center',
							borderRadius: 5,
						},
						a3: {
							color: '#fff',
							backgroundColor: baccolor[0],
							width: 30,
							height: 30,
							align: 'center',
							borderRadius: 5,
						},
						b: {
							color: '#fff',
							backgroundColor: baccolor[1],
							width: 30,
							height: 30,
							align: 'center',
							borderRadius: 5,
						},
						c: {
							width: 3,
							height: 30,
							backgroundColor: '#0CFCFF',
						},
						c1: {
							width: 3,
							height: 30,
							backgroundColor: '#FDD230',
						},
					},
					formatter: function (params, index) {
						index++;
						if (index - 1 < 3) {
							return ['{c|}' + '  ' + '{a' + index + '|' + index + '}' + '  ' ].join('\n');
						} else {
							return ['{c1|}' + '  ' + '{b|' + index + '}' + '  '].join('\n');
						}
					},
				},
			},

			series: [
				{
					// 内
					type: "bar",
					barWidth: 20,
					legendHoverLink: false,
					silent: true,
					itemStyle: {
						normal: {
							color: function (params) {
								var color;
								if (params.dataIndex <= 2) {
									color = {
										type: "linear",
										x: 0,
										y: 0,
										x2: 1,
										y2: 0,
										colorStops: [{
											offset: 0,
											color: "#0CFCFF" // 0% 处的颜色
										},
										{
											offset: 1,
											color: "rgba(12, 252, 255, 0.1)" // 100% 处的颜色
										}
										]
									}
								} else {
									color = {
										type: "linear",
										x: 0,
										y: 0,
										x2: 1,
										y2: 0,
										colorStops: [{
											offset: 0,
											color: "#FDD230" // 0% 处的颜色
										},
										{
											offset: 1,
											color: " rgba(253, 210, 48, 0.4)" // 100% 处的颜色
										}
										]
									}
								}

								return color;
							},
						}
					},
					label: {
						distance :20,
						normal: {
							show: true,
							position:'left',
							formatter: "{b}",
							textStyle: {
								color: "#fff",
								fontSize: 14
							}
						}
					},
					data: data,
					z: 1,
					animationEasing: "elasticOut"
				},
				{
					name: '外框',
					type: 'bar',
					barGap: '-140%', // 设置外框粗细
					data: totalList,
					barWidth: 40,
					itemStyle: {
						normal: {
							color: function (params) {
								var color;
								if (params.dataIndex <= 2) {
									color =
									{
										type: 'linear',
										x: 0,
										y: 0,
										x2: -1,
										y2: 3,
										colorStops: [
											{
												offset: 0,
												color: 'rgba(12, 252, 255, 0.1)', // 0% 处的颜色
											},
											{
												offset: 1,
												color: 'rgba(12, 252, 255, 0)', // 100% 处的颜色
											},
										],
									}

								} else {
									color =
									{
										type: 'linear',
										x: 0,
										y: 0,
										x2: -1,
										y2: 3,
										colorStops: [
											{
												offset: 0,
												color: ' rgba(253, 210, 48, 0.1)', // 0% 处的颜色
											},
											{
												offset: 1,
												color: ' rgba(253, 210, 48, 0)', // 100% 处的颜色
											},
										],
									}
								}


								return color;

							},
							label: {
								// 标签显示位置
								show: false,
								position: 'top', // insideTop 或者横向的 insideLeft
							},
						},
					},
					z: 0,
				},
				{
					// 分隔
					type: 'pictorialBar',
					itemStyle: {
						normal: {
							color: 'rgba(255,255,255,0.7)',
						},
					},
					symbolRepeat: 'fixed',
					symbolMargin: 4,
					symbol: 'roundRect',
					symbolClip: true,
					symbolSize: [2, 19],
					// symbolPosition: 'start',
					symbolOffset: [0, -5],
					data: data,
					symbolBoundingData: this.total,
					z: -1,
					animationEasing: 'elasticOut',
				},
			],
		};
		return option
	},
	//块状横向带圆角柱状图
	getBarRadiusBlock: (optionData) => {
		let datas = [];
		let innerWidth = window.innerWidth
		optionData.seriesData.forEach(value => {
			datas.push(value.name);
		});
		console.log({ datas })
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'none',
					shadowStyle: {
						color: 'transparent'
					},
					label: {
						show: false,
						color: 'transparent',
						backgroundColor: 'transparent',
					}
				},
				formatter: function (item) {
					return item[0].data.name + ': ' + item[0].data.value
				},
				transitionDuration: 0,
			},
			xAxis: {
				type: "value",
				splitLine: {
					show: false
				},
				axisLabel: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisLine: {
					show: false
				}
			},
			grid: {
				left: "12%",
				right: "15%",
				bottom: "2%",
				width: "73%",
				top: "1%",
				containLabel: false
			},
			yAxis: [
				{
					type: "category",
					inverse: true,
					axisLine: {
						show: false
					},
					axisTick: {
						show: false
					},
					axisPointer: {
						label: {
							show: true,
						}
					},
					padding: [0, 0, 0, 0],
					postion: "left",
					data: optionData.seriesData,
					axisLabel: {
						margin: 40,
						fontSize: nowSize(13),
						align: "left",
						padding: [2, 0, 0, 0],
						color: "#000",
						rich: {
							a: {
								color: '#fff',
								backgroundColor: optionData.colorList[0],
								width: innerWidth <= 1400 ? 15 : 20,
								height: innerWidth <= 1400 ? 15 : 20,
								align: 'center',
								verticalAlign: 'middle',
								borderRadius: 4,
								fontSize: nowSize(13),
							},
						},
						formatter: function (params, index) {
							index++;
							return [
								'{a|' + index + '}'
							].join('\n')
						}
					}
				},
				{
					type: "category",
					inverse: true,
					axisTick: "none",
					axisLine: "none",
					show: true,
					axisLabel: {
						textStyle: {
							color: optionData.labelRightColor,
							fontSize: nowSize(13),
						},
						padding: 2,
						verticalAlign: "center",
						formatter: function (params) {
							return params + "%"
						}
					},
					data: optionData.seriesData
				},
				{//名称
					type: 'category',
					offset: -8,
					position: "left",
					axisLine: {
						show: false
					},
					inverse: false,
					axisTick: {
						show: false
					},
					axisLabel: {
						interval: 0,
						color: ["#fff"],
						align: "left",
						verticalAlign: "bottom",
						fontSize: nowSize(13),
					},
					data: datas
				},
			],
			series: [
				{

					type: "pictorialBar",
					symbol: optionData.symbol,
					data: optionData.seriesData,
					barWidth: optionData.interval === true && innerWidth >= 1400 ? 35 :
						optionData.interval === true && innerWidth <= 1400 ? 20 :
							optionData.interval === false && innerWidth >= 1400 ? 50 : 35,
					symbolMargin: '18%',
					symbolSize: innerWidth <= 1400 ? [4, 8] : [6, 10],
					symbolRepeat: true,
					symbolClip: false,
					z: 1,
				}, {
					// 背景条和右侧label
					type: "pictorialBar",
					symbol: "rect",
					barWidth: optionData.interval === true && innerWidth >= 1400 ? 25 :
						optionData.interval === true && innerWidth <= 1400 ? 16 :
							optionData.interval === false && innerWidth >= 1400 ? 35 : 23,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
								offset: 0,
								color: optionData.shadowBarGradientColor.topColor
							}, {
								offset: 1,
								color: optionData.shadowBarGradientColor.bottomColor
							}])
						}
					},
					symbolOffset: [-90, 0],
					data: optionData.seriesData,
					z: 0,
				},
			]
		};
		return option
	},
	//块状横向带圆角柱状图2
	getBarRadiusBlock2: (optionData) => {
		let datas = [];
		let innerWidth = window.innerWidth
		optionData.seriesData.forEach(value => {
			datas.push(value.name);
		});
		console.log({ datas })
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'none',
					shadowStyle: {
						color: 'transparent'
					},
					label: {
						show: false,
						color: 'transparent',
						backgroundColor: 'transparent',
					}
				},
				formatter: function (item) {
					return item[0].data.name + ': ' + item[0].data.value
				},
				transitionDuration: 0,
			},
			xAxis: {
				type: "value",
				splitLine: {
					show: false
				},
				axisLabel: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisLine: {
					show: false
				},


			},
			grid: {
				left: "12%",
				right: "15%",
				// bottom: "2%",
				width: "73%",
				top: "1%",
				containLabel: false
			},
			yAxis: [
				{
					type: "category",
					inverse: true,
					axisLabel: {
						show: true,
						textStyle: {
							fontSize: '20'
						}
					},
					axisLine: {
						show: false
					},
					axisTick: {
						show: false
					},
					axisPointer: {
						label: {
							show: true,
						}
					},
					padding: [0, 0, 0, 0],
					postion: "left",
					data: optionData.seriesData,
					axisLabel: {
						margin: 40,
						fontSize: nowSize(13),
						align: "left",
						padding: [2, 0, 0, 0],
						color: "#000",
						rich: {
							a1: {
								color: '#fff',
								backgroundColor: optionData.colorList[0], width: innerWidth <= 1400 ? 15 : 20,
								height: innerWidth <= 1400 ? 15 : 20,
								align: 'center',
								verticalAlign: 'middle',
								borderRadius: 4,
								fontSize: nowSize(13),
							},
							a: {
								color: '#fff',
								backgroundColor: optionData.colorList[1],
								width: innerWidth <= 1400 ? 15 : 20,
								height: innerWidth <= 1400 ? 15 : 20,
								align: 'center',
								verticalAlign: 'middle',
								borderRadius: 4,
								fontSize: nowSize(13),
							},
							line: {
								backgroundColor: optionData.colorList[0],
								width: innerWidth <= 1400 ? 15 : 20,
								height: innerWidth <= 1400 ? 15 : 20,
								align: 'center',
								verticalAlign: 'middle',
								borderRadius: 4,
								fontSize: nowSize(13),
							}
						},
						formatter: function (params, index) {
							index++;
							var str = '';
							if (index === 0) {
								str = '{a1|' + index + '} '
							} else if (index === 1) {
								str = '{a1|' + index + '}'
							} else if (index === 2) {
								str = '{a1|' + index + '}'
							} else if (index === 3) {
								str = '{a1|' + index + '}'
							} else {
								str = '{a|' + index + '} '
							}
							return str
							// return [
							// 	'{a|' + index + '}'
							// ].join('\n')
						}
					}
				},
				{
					type: "category",//最右侧百分比
					show: false,
					inverse: true,
					axisTick: "none",
					axisLine: "none",
					axisLabel: {
						textStyle: {
							color: optionData.labelRightColor,
							fontSize: nowSize(13),
						},
						padding: 2,
						verticalAlign: "center",
						formatter: function (params) {
							return params + "%"
						}
					},
					data: optionData.seriesData
				},
				{//名称
					type: 'category',
					offset: -6,
					position: 'left',
					axisLine: {
						show: false
					},
					inverse: true,
					axisTick: {
						show: false
					},
					axisLabel: {
						interval: 0,
						color: ["#fff"],
						align: "left",
						verticalAlign: "center",
						fontSize: nowSize(13),
						formatter: function(params) {
							var newParamsName = ''
							var paramsNameNumber = params.length
							var provideNumber = 5 // 一行显示几个字
							var rowNumber = Math.ceil(paramsNameNumber / provideNumber)
							 if (paramsNameNumber > provideNumber) {
								for (var p = 0; p < rowNumber; p++) {
									 var tempStr = ''
									 var start = p * provideNumber
									 var end = start + provideNumber
									  if (p === rowNumber - 1) {
									   tempStr = params.substring(start, paramsNameNumber)
									 } else {
									   tempStr = params.substring(start, end) + '\n'
									 }
									  newParamsName += tempStr
								}
								}else {
								   newParamsName = params
								 }
								 return newParamsName
								 }
					},
					data: datas
				},
			],
			series: [
				{

					type: "pictorialBar",
					// symbol: optionData.symbol,
					data: optionData.seriesData,
	barWidth: optionData.interval === true && innerWidth >= 1400 ? 35 :
						optionData.interval === true && innerWidth <= 1400 ? 20 :
							optionData.interval === false && innerWidth >= 1400 ? 50 : 35,
					symbolMargin: '18%',
					symbolSize: innerWidth <= 1400 ? [4, 8] : [6, 10],
					symbolRepeat: true,
					symbolClip: false,
					symbolOffset: [70, 0],
					z: 1,
				},
				//  {
				// 背景条和右侧label
				// type: "pictorialBar",
				// symbol: "rect",
				// barWidth: optionData.interval === true && innerWidth >= 1400 ? 25 :
				// 	optionData.interval === true && innerWidth <= 1400 ? 16 :
				// 		optionData.interval === false && innerWidth >= 1400 ? 35 : 23,
				// itemStyle: {
				// 	normal: {
				// 		color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
				// 			offset: 0,
				// 			color: optionData.shadowBarGradientColor.topColor
				// 		}, {
				// 			offset: 1,
				// 			color: optionData.shadowBarGradientColor.bottomColor
				// 		}])
				// 	}
				// },
				// symbolOffset: [-90, 0],
				// data: optionData.seriesData,
				// z: 0,
				// },
			]
		};
		return option
	},
	//块状横向带圆角柱状图3
	getBarRadiusBlock3: (optionData) => {
		let datas = [];
		let innerWidth = window.innerWidth
		optionData.seriesData.forEach(value => {
			datas.push(value.name);
		});
		console.log({ datas })
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'none',
					shadowStyle: {
						color: 'transparent'
					},
					label: {
						show: false,
						color: 'transparent',
						backgroundColor: 'transparent',
					}
				},
				formatter: function (item) {
					return item[0].data.name + ': ' + item[0].data.value
				},
				transitionDuration: 0,
			},
			xAxis: {
				type: "value",
				splitLine: {
					show: false
				},
				axisLabel: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisLine: {
					show: false
				}
			},
			grid: {
				left: "12%",
				right: "15%",
				// bottom: "2%",
				width: "60%",
				top: "1%",
				containLabel: false
			},
			yAxis: [
				{
					type: "category",
					inverse: true,
					axisLabel: {
						show: true,
						textStyle: {
							fontSize: '20'
						}
					},
					axisLine: {
						show: false
					},
					axisTick: {
						show: false
					},
					axisPointer: {
						label: {
							show: true,
						}
					},
					padding: [0, 0, 0, 0],
					postion: "left",
					data: optionData.seriesData,
					axisLabel: {
						margin: 40,
						fontSize: nowSize(13),
						align: "left",
						padding: [2, 0, 0, 0],
						color: "#000",
						rich: {
							a: {
								color: '#fff',
								backgroundColor:'#FDD230',
								width: innerWidth <= 1400 ? 15 : 20,
								height: innerWidth <= 1400 ? 15 : 20,
								align: 'center',
								verticalAlign: 'middle',
								borderRadius: 4,
								fontSize: nowSize(13),
							},
							a1: {
								color: '#fff',
								backgroundColor: '#0CFCFF',
								width: innerWidth <= 1400 ? 15 : 20,
								height: innerWidth <= 1400 ? 15 : 20,
								align: 'center',
								verticalAlign: 'middle',
								borderRadius: 4,
								fontSize: nowSize(13),
							},
							c: {
								width: innerWidth <= 1400 ? 3 : 5,
								height: innerWidth <= 1400 ? 15 : 20,
								backgroundColor: '#0CFCFF',
								align: 'center',
								verticalAlign: 'middle',
							},
							c1: {
								width: innerWidth <= 1400 ? 3 : 5,
								height: innerWidth <= 1400 ? 15 : 20,
								backgroundColor: '#FDD230',
								align: 'center',
								verticalAlign: 'middle',
							},
						},
						formatter: function (params, index) {
							var str = '';
							index++
							if (index === 1) {
								str = '{c|}  ' + '{a1|' + index + '} '
							} else if (index === 2) {
								str = '{c|}  ' +'{a1|' + index + '}'
							} else if (index === 3) {
								str = '{c|}  ' +'{a1|' + index + '}'
							} else {
								str = '{c1|}  ' +'{a|' + index + '} '
							}
							return str
						}
					}
				},
				{
					type: "category",//最右侧数字百分比
					show: false,//关闭
					inverse: true,
					axisTick: "none",
					axisLine: "none",
					axisLabel: {
						textStyle: {
							color: optionData.labelRightColor,
							fontSize: nowSize(13),
						},
						padding: 2,
						verticalAlign: "center",
						formatter: function (params) {
							return params + "%"
						}
					},
					data: optionData.seriesData
				},
					{//名称
						type: 'category',
						offset: -6,
						position: 'left',
						axisLine: {
							show: false
						},
						inverse: true,
						axisTick: {
							show: false
						},
						axisLabel: {
							interval: 0,
							color: ["#fff"],
							align: "left",
							verticalAlign: "center",
							fontSize: nowSize(13),
							formatter: function(params) {
								var newParamsName = ''
								var paramsNameNumber = params.length
								var provideNumber = 10// 一行显示几个字
								var rowNumber = Math.ceil(paramsNameNumber / provideNumber)
								 if (paramsNameNumber > provideNumber) {
									for (var p = 0; p < rowNumber; p++) {
										 var tempStr = ''
										 var start = p * provideNumber
										 var end = start + provideNumber
										  if (p === rowNumber - 1) {
										   tempStr = params.substring(start, paramsNameNumber)
										 } else {
										   tempStr = params.substring(start, end) + '\n'
										 }
										  newParamsName += tempStr
									}
									}else {
									   newParamsName = params
									 }
									 return newParamsName
									 }
						},
						data: datas
					},
				// {//名称
				// 	type: 'category',
				// 	offset: -8,
				// 	position: "left",
				// 	axisLine: {
				// 		show: false
				// 	},
				// 	inverse: false,
				// 	axisTick: {
				// 		show: false
				// 	},
				// 	axisLabel: {
				// 		interval: 0,
				// 		color: ["#fff"],
				// 		align: "left",
				// 		verticalAlign: "bottom",
				// 		fontSize: nowSize(13),
				// 	},
				// 	data: datas
				// },
			],
			series: [
				{
					type: "pictorialBar",
					// position: 'center',
					symbol: optionData.symbol,
					data: optionData.seriesData,
					barWidth: optionData.interval === true && innerWidth >= 1400 ? 35 :
					optionData.interval === true && innerWidth <= 1400 ? 20 :
						optionData.interval === false && innerWidth >= 1400 ? 50 : 35,
					symbolMargin: '18%',
					symbolSize: innerWidth <= 1400 ? [4, 8] : [6, 10],
					symbolOffset: [90, 0],
					symbolRepeat: true,
					symbolClip: false,
					z: 1,
				},
				 {
					// 背景条
					type: "pictorialBar",
					symbol: "rect",
					barWidth: optionData.interval === true && innerWidth >= 1400 ? 35 :
					optionData.interval === true && innerWidth <= 1400 ? 20 :
						optionData.interval === false && innerWidth >= 1400 ? 50 : 35,
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
								offset: 0,
								color: optionData.shadowBarGradientColor.topColor
							}, {
								offset: 1,
								color: optionData.shadowBarGradientColor.bottomColor
							}])
						}
					},
					symbolOffset: [-90, 0],
					data: optionData.seriesData,
					z: 0,
				},
			]
		};
		return option
	},
	// 双向正负对比图
	getTwowayBar: (optionData) => {
		var data = optionData.seriesData
		var datas = []
		data.forEach((item, index, arr) => {
			let dataItem = {
				value: item,
				itemStyle: {
					normal: {
						barBorderRadius: item > 0 ? [0, 20, 20, 0] : [20, 0, 0, 20],
						color: index == 0 ? optionData.colorList[0] : index > 0 && index < 5 ? optionData.colorList[1] : optionData.colorList[2]
					}
				},
				label: {
					show: true,
					position: item > 0 ? 'right' : 'left',
					color: index == 0 ? optionData.colorList[0] : index > 0 && index < 5 ? optionData.colorList[1] : optionData.colorList[2],
					offset: item > 0 ? [8, 0] : [-8, 0],
				}
			}
			datas.push(dataItem)
		})
		let option = {
			"grid": {
				"top": 10,
				"bottom": 30,
				"right": 25,
				"left": 25,
			},
			"tooltip": {
				"padding": 10,
			},
			"yAxis": [{
				"nameTextStyle": {
					"color": "#fff",
					"padding": [120, 120, 100, 120],
					// "fontSize": 26
				},
				"axisLabel": {
					"color": "#fff",
					// "fontSize": 26,
					// "interval": 0,
					"align": "right",
					"padding": [0, 1600, 0, 10]
				},
				"axisTick": {
					"show": false
				},
				"splitLine": {
					"show": false
				},
				"axisLine": {
					"show": false
				},
				"type": "category",
				"data": optionData.categoryAxis,
				"inverse": true,
				"offset": 60
			}],
			"xAxis": {
				"nameTextStyle": {
					"color": "#BBC5D9",
					"padding": [0, 20, 10, 0],
					// "fontSize": 26
				},
				"axisLabel": {
					"show": true,
					"color": "#fff",
				},
				"axisTick": {
					"show": false
				},
				"splitLine": {
					"show": false
				},
				"axisLine": {
					"show": false
				}
			},
			"series": [{
				"type": "bar",
				"barGap": "200%",
				"barWidth": 10,
				// 'itemStyle':{
				// 	'normal':{
				// 		'label': {
				// 			'show': true,
				// 			"position":'right',
				// 			'color':'#fff'
				// 		}
				// 	}
				// },
				"data": datas
			}]
		}
		return option
	},
	// 横向柱状图--带圆角的象形柱图
	getInfeedBarRadius: (optionData) => {
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
				transitionDuration: 0,
			},
			legend: {
				show: false,
			},
			grid: {
				top: '2%',
				left: '6%',
				right: '15%',
				bottom: '4%',
				width: '70%',
				containLabel: true
			},
			xAxis: {
				type: 'value',
				axisLine: {
					show: false
				},
				splitLine: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisLabel: {
					show: false
				},
			},
			yAxis: {
				type: 'category',
				data: optionData.categoryAxis,
				axisLine: {
					show: false
				},
				offset: 10,
				splitLine: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisLabel: {
					show: optionData.yaxisLabel ? true : false,
					interval: 0,
					color: ' #fff',
					align: 'right',
					margin: 0,
					fontSize: nowSize(13),
				},
			},
			series: [
				{
					name: optionData.title,
					type: "pictorialBar",
					symbol: optionData.symbol,
					data: optionData.seriesData.data,
					symbolMargin: '18%',
					symbolSize: [6, 10],
					symbolRepeat: true,
					symbolClip: false,
					z: 2,
					barWidth: 30,

				},
				{
					// 背景条
					type: "bar",
					tooltip: {
						show: false
					},
					itemStyle: {
						normal: {
							color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
								offset: 0,
								color: optionData.shadowBarGradientColor.topColor
							},
							{
								offset: 1,
								color: optionData.shadowBarGradientColor.bottomColor
							}
							]),
						}
					},
					symbolOffset: [0, 0],
					axisPointer: {
						type: 'none'
					},
					silent: false,
					barWidth: 30,
					z: 1,
					animationEasing: "elasticOut",
					data: optionData.seriesData.shadowData,
					label: {
						show: true,
						position: 'right',
						fontSize: nowSize(14),
						distance: nowSize(14),
						color: optionData.labelColor,
						formatter: function (data) {
							return optionData.seriesData.data[data.dataIndex] + optionData.seriesData.unit;
						},
					}
				},
			]
		}
		return option
	},
	//横向柱状图--带圆角带序号的象形柱图
	getBarRadiusSerialBlock: (optionData) => {
		let datas = [];
		let innerWidth = window.innerWidth
		optionData.seriesData.forEach(value => {
			datas.push(value.mhbzmj);
		});
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow',
				},
				formatter: function (item) {
					return optionData.title + '<br />' + item[0].data.name + ': ' + item[0].data.value + optionData.unit
				},
				transitionDuration: 0,
			},
			xAxis: {
				max: optionData.total,
				splitLine: {
					show: false
				},
				axisLine: {
					show: false
				},
				axisLabel: {
					show: false
				},
				axisTick: {
					show: false
				},
			},
			grid: {
				left: optionData.left,
				top: 10, // 设置条形图的边距
				right: '15%',
				bottom: 10
			},
			yAxis: [{
				type: "category",
				inverse: true,
				data: optionData.seriesData,
				axisLine: {
					show: false
				},
				axisTick: {
					show: false
				},
				axisPointer: {
					label: {
						show: false,
						margin: 30
					}
				},
				axisLabel: {
					margin: 80,
					fontSize: nowSize(16),
					align: 'left',
					color: '#333',
					rich: {
						a: {
							color: '#fff',
							backgroundColor: optionData.colorList[0],
							width: innerWidth <= 1400 ? 16 : 25,
							height: innerWidth <= 1400 ? 16 : 25,
							align: 'center',
							verticalAlign: 'middle',
							borderRadius: 4,
						},
						b: {
							color: '#fff',
							backgroundColor: optionData.colorList[1],
							width: innerWidth <= 1400 ? 16 : 25,
							height: innerWidth <= 1400 ? 16 : 25,
							align: 'center',
							verticalAlign: 'middle',
							borderRadius: 4,
						}
					},
					formatter: function (params, index) {
						index++;
						if (index - 1 < 5) {
							return [
								'{a|' + index + '}'
							].join('\n')
						} else {
							return [
								'{b|' + index + '}'
							].join('\n')
						}
					}
				}
			},
			{//名称
				type: 'category',
				position: "right",
				axisLine: {
					show: false
				},
				inverse: true,
				axisTick: {
					show: false
				},
				axisLabel: {
					interval: 0,
					color: ["#fff"],
					align: "left",
					verticalAlign: "middle",
					fontSize: nowSize(13),
					rich: {
						a: {
							color: '#eb5b46',
							fontSize: nowSize(13)
						},
						b: {
							color: '#20bcf6',
							fontSize: nowSize(13)
						}
					},
					formatter: function (params, index) {
						index++;
						if (index - 1 < 5) {
							return [
								'{a|' + params + optionData.bzmjUnit + '}'
							].join('\n')
						} else {
							return [
								'{b|' + params + optionData.bzmjUnit + '}'
							].join('\n')
						}
					}
				},
				data: optionData.seriesDataLabel
			},
			],
			series: [
				{
					// 带圆角的柱图
					type: "pictorialBar",
					symbol: optionData.symbol,
					symbolMargin: '18%',
					symbolSize: innerWidth <= 1400 ? [4, 7] : [6, 10],
					symbolRepeat: true,
					symbolClip: false,
					legendHoverLink: false,
					silent: true,
					stack: '1',
					label: {
						normal: {
							show: true,
							formatter: "{b}",
							textStyle: {
								color: "#fff",
								fontSize: nowSize(13)
							},
							position: innerWidth <= 1400 ? [-40, 7] : [-40, 15],
						},
					},
					symbolOffset: innerWidth <= 1400 ? [20, 0] : [40, 0],
					barWidth: innerWidth <= 1400 ? 25 : 40,
					data: optionData.seriesData,
					z: 1,
				},
				{
					// 背景条和右侧label
					name: optionData.categoryAxis,
					type: "pictorialBar",
					symbol: "rect",
					symbolBoundingData: optionData.total,
					itemStyle: {
						normal: {
							color: function (params) {
								if (optionData.backgroundSorColor) {
									if (params.dataIndex <= 4) {
										return new echarts.graphic.LinearGradient(0, 0, 1, 0, [
											{
												offset: 0,
												color: optionData.backgroundSorColor[0].leftColor
											}, {
												offset: 1,
												color: optionData.backgroundSorColor[0].rightColor
											},
										])
									} else {
										return new echarts.graphic.LinearGradient(0, 0, 1, 0, [
											{
												offset: 0,
												color: optionData.backgroundSorColor[1].leftColor
											}, {
												offset: 1,
												color: optionData.backgroundSorColor[1].rightColor
											},
										])
									}
								} else {
									return optionData.backgroundColor ? optionData.backgroundColor : "rgba(16,252,204,.1)"
								}

							}
						}
					},
					barWidth: innerWidth <= 1400 ? 25 : 40,
					symbolOffset: [-90, 0],
					// symbolSize: optionData.symbolSize ? optionData.symbolSize : innerWidth <= 1400 ? ['128%','100%'] :innerWidth <= 1600 ? ['122%','90%'] : ['118%','80%'],
					// label: {
					// 	normal: {
					// 		formatter: (params) => {
					// 			if(params.dataIndex<=4){
					// 				return optionData.Percent?'{b|  ' + params.value +optionData.bzmjUnit+ '}':'{a|  ' + params.data + '}';
					// 			}else{
					// 				return optionData.Percent?'{c|  ' + params.value +optionData.bzmjUnit+ '}':'{a|  ' + params.data + '}';
					// 			}

					// 		},
					// 		rich: {
					// 			a: {
					// 				color: '#fff'
					// 			},
					// 			b: {
					// 				color: '#eb5b46'
					// 			},
					// 			c: {
					// 				color: '#20bcf6'
					// 			},
					// 		},
					// 		position: 'right',
					// 		distance: innerWidth <= 1400 ?10:5, // 向右偏移位置
					// 		show: true,
					// 		itemStyle: {
					// 			normal: {
					// 				color: "transparent", // 填充色
					// 				top: 0,
					// 				label: {
					// 					// 标签显示位置
					// 					show: false,
					// 					position: "top", // insideTop 或者横向的 insideLeft
					// 				}
					// 			}
					// 		}
					// 	}
					// },
					data: optionData.seriesDataLabel,
					z: 0,
					animationEasing: "elasticOut"
				},
			]
		}
		return option
	},
	// 面积堆叠图
	getAreaLine: (optionData) => {
		var seriesData = []
		var legendData = []
		optionData.seriesData.forEach((item, index, arr) => {
			let series = {
				name: item.name,
				type: 'line',
				stack: optionData.title,
				symbolSize: 7,
				symbol: "circle",
				smooth: optionData.smooth || false,
				data: item.data,
				itemStyle: {
					normal: {
						color: optionData.LinearGradientColor[index].pointColor,//拐点中心颜色
						borderColor: optionData.LinearGradientColor[index].borderColor,//拐点边框颜色
						lineStyle: {
							color: optionData.LinearGradientColor[index].lineColor,//折线颜色
						}
					}
				},
				areaStyle: {
					normal: {
						color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
							offset: 0,
							color: optionData.LinearGradientColor[index].bottomColor
						},
						{
							offset: 1,
							color: optionData.LinearGradientColor[index].topColor
						}
						]),
					}
				},
			}
			seriesData.push(series)
			legendData.push(item.name)
		})
		let option = {
			tooltip: {
				trigger: 'axis',
				axisPointer: {
					type: 'shadow'
				},
			},
			legend: {
				data: legendData,
				top: '2%',
				left: "right",
				textStyle: {
					color: "#ffffff",
					fontSize: nowSize(16),
					padding: 0
				},
			},
			grid: {
				left: '3%',
				right: '4%',
				bottom: optionData.LinearGradientbottom||'0%',
				containLabel: true
            },
            dataZoom: optionData.LinearGradientDataZoom||[],
			xAxis: [
				{
					type: 'category',
					boundaryGap: false,
					data: optionData.categoryAxis,
					axisLabel: {
                        interval: 0,
						show: true,
						color: ' #fff',
						fontSize: nowSize(16),
						rotate: optionData.rotate || 0,
					},
					axisLine: {
						show: false
					},
					splitLine: {
						show: false
					},
					axisTick: {
						show: false
					},
				}
			],
			yAxis: [
				{
					name: optionData.seriesData[0].unit,
					nameTextStyle: {
						color: "#ffffff",
						fontSize: nowSize(16),
						padding: [0, 15, 0, 0]
					},
					type: 'value',
					axisLabel: {
						show: true,
						color: ' #fff',
						fontSize: nowSize(16),
					},
					axisLine: {
						show: false
					},
					splitLine: {
						show: false
					},
					axisTick: {
						show: false
					},
				}
			],
			series: seriesData
		}
		return option
	},
	//有label的柱状图
	getBarLable: (optionData) => {
		let data = [optionData.data.ynl, optionData.data.cwl, optionData.data.zwl]
		let option = {
			tooltip: {
				show: false,
			},
			legend: {
				show: false
			},
			grid: {
				left: "3%",
				right: "4%",
				bottom: "3%",
				top: "18%",
				containLabel: true,
			},
			xAxis: {

				type: "category",
				data: optionData.axis,
				axisLabel: {
					interval: 0,
					color: '#ffffff',
					fontSize: nowSize(16),
					rotate: optionData.rotate || 0,
				},
				axisTick: {
					show: false,
				},
				axisLine: {
					show: false,
				},
			},
			yAxis: {
				type: "value",
				axisLabel: {
					show: false,
				},
				axisTick: {
					show: false,
				},
				axisLine: {
					show: false,
				},
				splitLine: {
					show: false,
				},
			},
			series: [{
				data: data,
				type: 'bar',
				barWidth: '45%',
				itemStyle: {
					normal: {
						color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0,
							color: "#ff9b00"
						}, {
							offset: 1,
							color: "#ff7300"
						}]),
					}
				},
				label: {
					show: true,
					position: 'top',
					color: "#ff9c00"
				}
			}]
		}
		return option
	},
}
